|
@@ -546,7 +546,7 @@ class ContentRevisionRO(DeclarativeBase):
|
546
|
546
|
)
|
547
|
547
|
file_mimetype = Column(Unicode(255), unique=False, nullable=False, default='')
|
548
|
548
|
file_content = deferred(Column(LargeBinary(), unique=False, nullable=True))
|
549
|
|
- depot_file_uid = Column(UploadedFileField, unique=False, nullable=True)
|
|
549
|
+ depot_file = Column(UploadedFileField, unique=False, nullable=True)
|
550
|
550
|
properties = Column('properties', Text(), unique=False, nullable=False, default='')
|
551
|
551
|
|
552
|
552
|
type = Column(Unicode(32), unique=False, nullable=False)
|
|
@@ -629,10 +629,10 @@ class ContentRevisionRO(DeclarativeBase):
|
629
|
629
|
setattr(new_rev, column_name, column_value)
|
630
|
630
|
|
631
|
631
|
new_rev.updated = datetime.utcnow()
|
632
|
|
- # TODO APY tweaks here depot_file_uid
|
|
632
|
+ # TODO APY tweaks here depot_file
|
633
|
633
|
# import pudb; pu.db
|
634
|
|
- # new_rev.depot_file_uid = DepotManager.get().get(revision.depot_file_uid)
|
635
|
|
- new_rev.depot_file_uid = revision.file_content
|
|
634
|
+ # new_rev.depot_file = DepotManager.get().get(revision.depot_file)
|
|
635
|
+ new_rev.depot_file = revision.file_content
|
636
|
636
|
|
637
|
637
|
return new_rev
|
638
|
638
|
|
|
@@ -1058,12 +1058,12 @@ class Content(DeclarativeBase):
|
1058
|
1058
|
return not self.is_archived and not self.is_deleted
|
1059
|
1059
|
|
1060
|
1060
|
@property
|
1061
|
|
- def depot_file_uid(self) -> UploadedFile:
|
1062
|
|
- return self.revision.depot_file_uid
|
|
1061
|
+ def depot_file(self) -> UploadedFile:
|
|
1062
|
+ return self.revision.depot_file
|
1063
|
1063
|
|
1064
|
|
- @depot_file_uid.setter
|
1065
|
|
- def depot_file_uid(self, value):
|
1066
|
|
- self.revision.depot_file_uid = value
|
|
1064
|
+ @depot_file.setter
|
|
1065
|
+ def depot_file(self, value):
|
|
1066
|
+ self.revision.depot_file = value
|
1067
|
1067
|
|
1068
|
1068
|
def get_current_revision(self) -> ContentRevisionRO:
|
1069
|
1069
|
if not self.revisions:
|