Browse Source

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

krish 8 years ago
parent
commit
8ab31a3
1 changed files with 2 additions and 0 deletions
  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)
             tag = DocumentTag.objects.get_example_tag(user=doc.owner)
             doc.tags.add(tag)
             doc.tags.add(tag)
+            doc_last_modified = doc.last_modified
 
 
             doc.save()
             doc.save()
+            Document.objects.filter(id=doc.id).update(last_modified=doc_last_modified)
       except Exception, e:
       except Exception, e:
         LOG.exception('error sharing sample user documents')
         LOG.exception('error sharing sample user documents')