Pārlūkot izejas kodu

HUE-7052 [desktop] Retain last_modified when sharing sample docs in sync_documents

krish 8 gadi atpakaļ
vecāks
revīzija
8ab31a3
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      desktop/core/src/desktop/models.py

+ 2 - 0
desktop/core/src/desktop/models.py

@@ -510,8 +510,10 @@ class DocumentManager(models.Manager):
 
             tag = DocumentTag.objects.get_example_tag(user=doc.owner)
             doc.tags.add(tag)
+            doc_last_modified = doc.last_modified
 
             doc.save()
+            Document.objects.filter(id=doc.id).update(last_modified=doc_last_modified)
       except Exception, e:
         LOG.exception('error sharing sample user documents')