zeeguu/core/model/exercise.py
def find_user_id(self, db_session):
        """
        Finds related user_id corresponding to the exercise

        Parameters:
        db_session = database session

        returns: user_id or None when none is found
        """
        from zeeguu.core.model.bookmark import Bookmark, bookmark_exercise_mapping
        import sqlalchemy

        query = Bookmark.query.filter(Bookmark.exercise_log.any(id=self.id))

        try:
            corresponding_bookmark = query.one()
            return corresponding_bookmark.user_id
        except sqlalchemy.orm.exc.NoResultFound:
            return None

        Finds related user_id corresponding to the exercise

        Parameters:
        db_session = database session

        returns: user_id or None when none is found
        
Finds related user_id corresponding to the exercise
Parameters:
db_session = database session

user_id or None when none is found
Finds related user_id corresponding to the exercise Parameters : db_session = database session user_id or None when none is found
def find_user_id(self, db_session):
        from zeeguu.core.model.bookmark import Bookmark, bookmark_exercise_mapping
        import sqlalchemy
        query = Bookmark.query.filter(Bookmark.exercise_log.any(id=self.id))
        try:
            corresponding_bookmark = query.one()
            return corresponding_bookmark.user_id
        except sqlalchemy.orm.exc.NoResultFound:
            return None
def find_user_id ( self , db_session ) : from zeeguu . core . model . bookmark import Bookmark , bookmark_exercise_mapping import sqlalchemy query = Bookmark . query . filter ( Bookmark . exercise_log . any ( id = self . id ) ) try : corresponding_bookmark = query . one ( ) return corresponding_bookmark . user_id except sqlalchemy . orm . exc . NoResultFound : return None
Finds related user_id corresponding to the exercise
Parameters:
db_session = database session
Finds related user_id corresponding to the exercise Parameters : db_session = database session
"""
        Finds related user_id corresponding to the exercise

        Parameters:
        db_session = database session

        returns: user_id or None when none is found
        """
self
db_session