Skip to content

Commit

Permalink
fix: handle if there is no event (#7490)
Browse files Browse the repository at this point in the history
Co-authored-by: Areeb Jamal <[email protected]>
  • Loading branch information
maze-runnar and iamareebjamal authored Dec 4, 2020
1 parent 00111a7 commit 745c030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def before_get_object(self, view_kwargs):
view_kwargs['id'] = None

def after_get_object(self, event, view_kwargs):
if event.state == "draft":
if event and event.state == "draft":
if not is_logged_in() or not has_access('is_coorganizer', event_id=event.id):
raise ObjectNotFound({'parameter': '{id}'}, "Event: not found")

Expand Down

0 comments on commit 745c030

Please sign in to comment.