Fixes an error that occurs when moving the document by setting another link ID or Scope path. This is due to the fact that author is a required property in the Work model.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 26 Nov 2008 15:52:38 +0000
changeset 588 d6ae9dd215fb
parent 587 7504504209a3
child 589 ee9122db04af
Fixes an error that occurs when moving the document by setting another link ID or Scope path. This is due to the fact that author is a required property in the Work model. Patch by: Lennard de Rijk
app/soc/views/models/document.py
--- a/app/soc/views/models/document.py	Tue Nov 25 23:16:32 2008 +0000
+++ b/app/soc/views/models/document.py	Wed Nov 26 15:52:38 2008 +0000
@@ -119,6 +119,9 @@
     if not entity:
       # new document so set author
       fields['author'] = user
+    else:
+      # else the author is the original author
+      fields['author'] = entity.author
     
     fields['modified_by'] = user