diff --git a/app/core/models/_telegram/templates/player.py b/app/core/models/_telegram/templates/player.py index 3baad4e..9945963 100644 --- a/app/core/models/_telegram/templates/player.py +++ b/app/core/models/_telegram/templates/player.py @@ -36,7 +36,8 @@ class PlayerTemplates: else: cd_log += "Can't decrypt content. " - user_existing_license = self.db_session.query(UserContent).filter_by(owner_address=user_wallet_address, status='active', content_id=content.id).first() + user_wallet_address = self.user.wallet_address(self.db_session) + user_existing_license = self.db_session.query(UserContent).filter_by(user_id=self.user.id, content_id=content.id).first() if local_content: content_meta = content.json_format() @@ -170,7 +171,6 @@ class PlayerTemplates: else: text = content_metadata_json.get('description').strip() - user_wallet_address = self.user.wallet_address(self.db_session) have_access = ( (content.owner_address == user_wallet_address) or bool(user_existing_license)