예제 #1
0
 def get_session(self, id_=None, friendly_id=None):
     """Get a session of the event"""
     if friendly_id is None and id_ is not None:
         criteria = {'id': id_}
     elif id_ is None and friendly_id is not None:
         criteria = {'friendly_id': friendly_id}
     else:
         raise ValueError('Exactly one kind of id must be specified')
     return get_related_object(self, 'sessions', criteria)
예제 #2
0
파일: events.py 프로젝트: florv/indico
 def get_session(self, id_=None, friendly_id=None):
     """Get a session of the event"""
     if friendly_id is None and id_ is not None:
         criteria = {'id': id_}
     elif id_ is None and friendly_id is not None:
         criteria = {'friendly_id': friendly_id}
     else:
         raise ValueError('Exactly one kind of id must be specified')
     return get_related_object(self, 'sessions', criteria)
예제 #3
0
 def get_contribution(self, id_):
     """Get a contribution of the event"""
     return get_related_object(self, 'contributions', {'id': id_})
예제 #4
0
파일: events.py 프로젝트: florv/indico
 def get_contribution(self, id_):
     """Get a contribution of the event"""
     return get_related_object(self, 'contributions', {'id': id_})