File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed
Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -212,10 +212,7 @@ def __repr__(self):
212212
213213 @hybrid_property
214214 def is_alipay_activated (self ):
215- if self .alipay_publishable_key and self .alipay_secret_key :
216- return True
217- else :
218- return False
215+ return bool (self .alipay_publishable_key and self .alipay_secret_key )
219216
220217 @hybrid_property
221218 def is_omise_activated (self ):
Original file line number Diff line number Diff line change @@ -319,10 +319,7 @@ def is_speaker_at_session(self, session_id):
319319 .filter (Session .id == session_id )
320320 .one ()
321321 )
322- if session :
323- return True
324- else :
325- return False
322+ return bool (session )
326323 except MultipleResultsFound :
327324 return False
328325 except NoResultFound :
@@ -335,10 +332,7 @@ def is_speaker_at_event(self, event_id):
335332 .filter (Session .event_id == event_id )
336333 .first ()
337334 )
338- if session :
339- return True
340- else :
341- return False
335+ return bool (session )
342336 except MultipleResultsFound :
343337 return False
344338 except NoResultFound :
You can’t perform that action at this time.
0 commit comments