(self, project)
Get all project assets from assets table in db
Get all project assets from assets table in db
Get all project assets from assets table in db
def get_project_assets(self, project):
        """ Get all project assets from assets table in db """

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

        cursor.execute("SELECT * FROM assets WHERE project=:project",
                       {'project': project.id})

        asset_tuples = cursor.fetchall()
        asset_objects = entities.Converter.convert_to_asset(asset_tuples)

        connection.close()

        # Clear list and append assets
        del self.project_assets[:]
        for asset in asset_objects:
            self.project_assets.append(asset)
def get_project_assets ( self , project ) : connection = sqlite3 . connect ( self . SQL_FILE_PATH ) cursor = connection . cursor ( ) cursor . execute ( "SELECT * FROM assets WHERE project=:project" , { 'project' : project . id } ) asset_tuples = cursor . fetchall ( ) asset_objects = entities . Converter . convert_to_asset ( asset_tuples ) connection . close ( ) # Clear list and append assets del self . project_assets [ : ] for asset in asset_objects : self . project_assets . append ( asset )