Exemple #1
0
 def by_apikey(cls, apikey):
     if apikey is not None:
         return session.query(cls).filter_by(apikey=apikey).first()
Exemple #2
0
 def by_slug(cls, slug):
     if slug is None:
         return
     return session.query(cls).filter_by(slug=slug).first()
Exemple #3
0
 def by_id(cls, id):
     if id is not None:
         return session.query(cls).filter_by(id=id).first()