Пример #1
0
 def _get_registered_limit(self, session, registered_limit_id):
     query = session.query(RegisteredLimitModel).filter_by(
         id=registered_limit_id)
     ref = query.first()
     if ref is None:
         raise exception.RegisteredLimitNotFound(id=registered_limit_id)
     return ref
Пример #2
0
 def _get_registered_limit(self, session, registered_limit_id):
     ref = session.query(RegisteredLimitModel).get(registered_limit_id)
     if ref is None:
         raise exception.RegisteredLimitNotFound(id=registered_limit_id)
     return ref