(self, project_id)
Get project by id
Get project by id
Get project by id
def get_project(self, project_id):
        """ Get project by id """

        connection = sqlite3.connect(self.SQL_FILE_PATH)
        cursor = connection.cursor()

        cursor.execute("SELECT * FROM projects WHERE id=:id",
                       {'id': project_id})
        project_tuple = cursor.fetchone()
        project_object = entities.Converter.convert_to_project([project_tuple])[0]

        connection.close()

        if project_object:
            return project_object
def get_project ( self , project_id ) : connection = sqlite3 . connect ( self . SQL_FILE_PATH ) cursor = connection . cursor ( ) cursor . execute ( "SELECT * FROM projects WHERE id=:id" , { 'id' : project_id } ) project_tuple = cursor . fetchone ( ) project_object = entities . Converter . convert_to_project ( [ project_tuple ] ) [ 0 ] connection . close ( ) if project_object : return project_object