mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2025-04-29 04:00:58 +00:00
move room detection to room uuid
This commit is contained in:
parent
6a3b1b309e
commit
dfa0945632
4 changed files with 24 additions and 28 deletions
|
@ -21,6 +21,10 @@ class BroadcastToolsEventInfoView(View):
|
|||
else False
|
||||
),
|
||||
},
|
||||
"rooms": {
|
||||
str(room.uuid): room.name.localize(self.request.event.locale)
|
||||
for room in self.request.event.rooms.all()
|
||||
},
|
||||
"slug": self.request.event.slug,
|
||||
"start": self.request.event.date_from.isoformat(),
|
||||
"end": self.request.event.date_to.isoformat(),
|
||||
|
|
|
@ -12,14 +12,6 @@ class BroadcastToolsOrgaView(PermissionRequired, FormView):
|
|||
def get_success_url(self):
|
||||
return self.request.path
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["localized_rooms"] = [
|
||||
room.name.localize(self.request.event.locale)
|
||||
for room in self.request.event.rooms.all()
|
||||
]
|
||||
return context
|
||||
|
||||
def form_valid(self, form):
|
||||
form.save()
|
||||
return super().form_valid(form)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue