예제 #1
0
 def delete(self, content: Content):
     content.owner = self._user
     content.is_deleted = 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-deleting file.
     content.label = '{label}-{action}-{date}'.format(
         label=content.label,
         action='deleted',
         date=current_date_for_filename())
     content.revision_type = ActionDescription.DELETION
예제 #2
0
 def undelete(self, content: Content):
     content.owner = self._user
     content.is_deleted = False
     content.revision_type = ActionDescription.UNDELETION