convert fix

This commit is contained in:
user committed 2025-02-27 10:25:53 +03:00
1 parent a40e04943a
commit 17b0d37143
2 files changed
+21 -24

No files matched your search

+1 -5
View File
@@ -29,7 +29,7 @@ class StoredContent(AlchemyBase, AudioContentMixin):
user_id = Column(Integer, ForeignKey('users.id'), nullable=True)
owner_address = Column(String(1024), nullable=True)
btfs_cid = Column(String(1024), nullable=True) # На самом деле это CID контента в High качестве
ipfs_cid = Column(String(1024), nullable=True) # На самом деле это CID контента в Low качестве
telegram_cid = Column(String(1024), nullable=True)
@@ -98,10 +98,6 @@ class StoredContent(AlchemyBase, AudioContentMixin):
def json_format(self):
extra_fields = {}
if self.btfs_cid:
extra_fields['btfs_cid'] = self.btfs_cid
if self.ipfs_cid:
extra_fields['ipfs_cid'] = self.ipfs_cid
if self.type.startswith('local'):
extra_fields['filename'] = self.filename
extra_fields['encrypted'] = self.encrypted