@@ -45,7 +45,13 @@ def display_default():
4545def display_event_detail_home (identifier ):
4646 event = get_published_event_or_abort (identifier )
4747 placeholder_images = DataGetter .get_event_default_images ()
48- custom_placeholder = DataGetter .get_custom_placeholders ()
48+ if event .sub_topic :
49+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
50+ elif event .topic :
51+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
52+ else :
53+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
54+
4955 call_for_speakers = DataGetter .get_call_for_papers (event .id ).first ()
5056 accepted_sessions = DataGetter .get_sessions (event .id ).all ()
5157 if event .copyright :
@@ -71,7 +77,12 @@ def display_event_detail_home(identifier):
7177def display_event_sessions (identifier ):
7278 event = get_published_event_or_abort (identifier )
7379 placeholder_images = DataGetter .get_event_default_images ()
74- custom_placeholder = DataGetter .get_custom_placeholders ()
80+ if event .sub_topic :
81+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
82+ elif event .topic :
83+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
84+ else :
85+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
7586 if not event .has_session_speakers :
7687 abort (404 )
7788 call_for_speakers = DataGetter .get_call_for_papers (event .id ).first ()
@@ -87,7 +98,12 @@ def display_event_sessions(identifier):
8798def display_event_schedule (identifier ):
8899 event = get_published_event_or_abort (identifier )
89100 placeholder_images = DataGetter .get_event_default_images ()
90- custom_placeholder = DataGetter .get_custom_placeholders ()
101+ if event .sub_topic :
102+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
103+ elif event .topic :
104+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
105+ else :
106+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
91107 if not event .has_session_speakers :
92108 abort (404 )
93109 tracks = DataGetter .get_tracks (event .id )
@@ -143,7 +159,12 @@ def display_event_schedule_xcal(identifier):
143159def display_event_cfs (identifier , via_hash = False ):
144160 event = get_published_event_or_abort (identifier )
145161 placeholder_images = DataGetter .get_event_default_images ()
146- custom_placeholder = DataGetter .get_custom_placeholders ()
162+ if event .sub_topic :
163+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
164+ elif event .topic :
165+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
166+ else :
167+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
147168 if not event .has_session_speakers :
148169 abort (404 )
149170
@@ -179,7 +200,12 @@ def display_event_cfs_via_hash(hash):
179200 abort (404 )
180201 event = DataGetter .get_event (call_for_speakers .event_id )
181202 placeholder_images = DataGetter .get_event_default_images ()
182- custom_placeholder = DataGetter .get_custom_placeholders ()
203+ if event .sub_topic :
204+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
205+ elif event .topic :
206+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
207+ else :
208+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
183209 if not event .has_session_speakers :
184210 abort (404 )
185211
@@ -214,7 +240,12 @@ def process_event_cfs(identifier, via_hash=False):
214240 if request .method == 'GET' :
215241 event = get_published_event_or_abort (identifier )
216242 placeholder_images = DataGetter .get_event_default_images ()
217- custom_placeholder = DataGetter .get_custom_placeholders ()
243+ if event .sub_topic :
244+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
245+ elif event .topic :
246+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
247+ else :
248+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
218249 if not event .has_session_speakers :
219250 abort (404 )
220251
@@ -262,7 +293,12 @@ def process_event_cfs(identifier, via_hash=False):
262293def display_event_coc (identifier ):
263294 event = get_published_event_or_abort (identifier )
264295 placeholder_images = DataGetter .get_event_default_images ()
265- custom_placeholder = DataGetter .get_custom_placeholders ()
296+ if event .sub_topic :
297+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
298+ elif event .topic :
299+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
300+ else :
301+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
266302 call_for_speakers = DataGetter .get_call_for_papers (event .id ).first ()
267303 if not (event .code_of_conduct and event .code_of_conduct != '' and event .code_of_conduct != ' ' ):
268304 abort (404 )
@@ -278,7 +314,12 @@ def display_event_coc(identifier):
278314def display_event_tickets (identifier ):
279315 event = get_published_event_or_abort (identifier )
280316 placeholder_images = DataGetter .get_event_default_images ()
281- custom_placeholder = DataGetter .get_custom_placeholders ()
317+ if event .sub_topic :
318+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .sub_topic )
319+ elif event .topic :
320+ custom_placeholder = DataGetter .get_custom_placeholder_by_name (event .topic )
321+ else :
322+ custom_placeholder = DataGetter .get_custom_placeholder_by_name ('Other' )
282323 if event .copyright :
283324 licence_details = DataGetter .get_licence_details (event .copyright .licence )
284325 else :
0 commit comments