bug correction on creation of content
authorrougeronj
Thu, 11 Oct 2012 18:18:07 +0200
changeset 844 1f69157772a1
parent 843 77f740eaf247
child 846 a089bd6a29fd
bug correction on creation of content
src/ldt/ldt/ldt_utils/models.py
--- a/src/ldt/ldt/ldt_utils/models.py	Thu Oct 11 18:09:32 2012 +0200
+++ b/src/ldt/ldt/ldt_utils/models.py	Thu Oct 11 18:18:07 2012 +0200
@@ -284,9 +284,11 @@
         
         create_front_project = False
         
+        # update it
+        self.sync_iri_file()        
+        
         if not self.pk:
-            create_front_project = True
-              
+            create_front_project = True  
 
         super(Content, self).save(*args, **kwargs)
         
@@ -296,10 +298,6 @@
             self.create_front_project()
             assign('ldt_utils.change_content', get_current_user(), self)
             
-        # update it
-        # To put after project creation, to assume transaction
-        self.sync_iri_file()
-
             
     def __unicode__(self):
         return str(self.id) + ": " + self.iri_id