#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
|
return None
|
||||||
|
|
||||||
if id is not None:
|
if id is not None:
|
||||||
|
try:
|
||||||
object = SLIDE[key].model.objects.get(pk=id)
|
object = SLIDE[key].model.objects.get(pk=id)
|
||||||
|
except SLIDE[key].DoesNotExist:
|
||||||
|
return None
|
||||||
if element:
|
if element:
|
||||||
return object
|
return object
|
||||||
return object.slide()
|
return object.slide()
|
||||||
|
Loading…
Reference in New Issue
Block a user