#167 fallback slide, if the slide does not exist
This commit is contained in:
parent
965b682abc
commit
2e498403cb
@ -39,7 +39,10 @@ def get_slide_from_sid(sid, element=False):
|
||||
return None
|
||||
|
||||
if id is not None:
|
||||
object = SLIDE[key].model.objects.get(pk=id)
|
||||
try:
|
||||
object = SLIDE[key].model.objects.get(pk=id)
|
||||
except SLIDE[key].DoesNotExist:
|
||||
return None
|
||||
if element:
|
||||
return object
|
||||
return object.slide()
|
||||
|
Loading…
Reference in New Issue
Block a user