Example #1
0
 def _get_one(query):
     # warning, does not filter out deprecated flashes, for internal use only
     Logger(__name__).info('Retrieving flash with query {}.'.format(query))
     return Persistence.get_one(Flash._get_coll(), query)
Example #2
0
 def _get_one(query):
     Logger(__name__).info('Retrieving story with query {}.'.format(query))
     return Persistence.get_one(Story._get_coll(), query)
Example #3
0
def _user(username):
    """Silently returns the current user referencing the username, used to prevent using old versions of
    documents. Should only be used internally when editing documents."""
    return Persistence.get_one(User._get_coll(), {'username': username})