Beispiel #1
0
 def archive(self, content: Content):
     content.owner = self._user
     content.is_archived = True
     # TODO - G.M - 12-03-2018 - Inspect possible label conflict problem
     # INFO - G.M - 12-03-2018 - Set label name to avoid trouble when
     # un-archiving file.
     content.label = '{label}-{action}-{date}'.format(
         label=content.label,
         action='archived',
         date=current_date_for_filename())
     content.revision_type = ActionDescription.ARCHIVING
Beispiel #2
0
 def unarchive(self, content: Content):
     content.owner = self._user
     content.is_archived = False
     content.revision_type = ActionDescription.UNARCHIVING