Fixed bug when reference projector for list of speakers slide is deleted. Fixed #3076.
This commit is contained in:
parent
9ffb008eb0
commit
d6af67d1df
@ -81,8 +81,14 @@ class CurrentListOfSpeakersSlide(ProjectorElement):
|
||||
|
||||
def get_requirements(self, config_entry):
|
||||
# The query mechanism on client needs the referenced projector.
|
||||
try:
|
||||
reference_projector = Projector.objects.get(
|
||||
pk=config['projector_currentListOfSpeakers_reference'])
|
||||
except Projector.DoesNotExist:
|
||||
# Reference projector was deleted so this projector element is empty.
|
||||
# Skip yielding more requirements (items and speakers).
|
||||
pass
|
||||
else:
|
||||
yield reference_projector
|
||||
|
||||
items = self.get_agenda_items(reference_projector)
|
||||
@ -106,8 +112,14 @@ class CurrentListOfSpeakersSlide(ProjectorElement):
|
||||
output = super().get_collection_elements_required_for_this(collection_element, config_entry)
|
||||
# Full update if agenda_item or referenced projector changes because
|
||||
# then we may have new candidates and therefor need new users.
|
||||
try:
|
||||
reference_projector = Projector.objects.get(
|
||||
pk=config['projector_currentListOfSpeakers_reference'])
|
||||
except Projector.DoesNotExist:
|
||||
# Reference projector was deleted so this projector element is empty.
|
||||
# Skip appending more stuff to output.
|
||||
pass
|
||||
else:
|
||||
is_reference_projector = collection_element == CollectionElement.from_values(
|
||||
reference_projector.get_collection_string(),
|
||||
reference_projector.pk)
|
||||
|
Loading…
Reference in New Issue
Block a user