From 2e498403cba21cf571420ffab01c20749004bfed Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sun, 3 Jun 2012 09:43:28 +0200 Subject: [PATCH] #167 fallback slide, if the slide does not exist --- openslides/projector/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openslides/projector/api.py b/openslides/projector/api.py index bc7c14ad5..35e533887 100644 --- a/openslides/projector/api.py +++ b/openslides/projector/api.py @@ -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()