Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/api/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def validate_event(user, modules, data):
raise ConflictException({'pointer': '/data/attributes/location-name'},
"Online Event does not have any locaton")

if not data.get('name', None) and data.get('state', None) == 'published':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not data.get('name', None)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because event name should not be empty

raise ConflictException({'pointer': '/data/attributes/location-name'},
"Event Name is required to publish the event")

if data.get('searchable_location_name') and data.get('is_event_online'):
raise ConflictException({'pointer': '/data/attributes/searchable-location-name'},
"Online Event does not have any locaton")
Expand Down