def _update_preview_id(self, preview_id): try: id = int(preview_id) except ValueError: id = 0 if id: preview = Session.query(Resource).filter(Resource.id==id).first() self.preview = preview
def _update_asset_id(self, asset_id): try: id = int(asset_id) except ValueError: id = 0 if id: asset = Session.query(Resource).filter(Resource.id==id).first() self.asset = asset