[repo] properly mark object as saved once added to its source (code much probably gone during a merge...)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 30 Sep 2010 14:58:57 +0200
changeset 6368 f907cc7f2875
parent 6367 d4c485ec1ca1
child 6370 8c3d6f739fa3
[repo] properly mark object as saved once added to its source (code much probably gone during a merge...)
server/repository.py
--- a/server/repository.py	Wed Sep 29 16:46:47 2010 +0200
+++ b/server/repository.py	Thu Sep 30 14:58:57 2010 +0200
@@ -1113,7 +1113,7 @@
                 problems[col] = session._('violates unique_together constraints (%s)') % (','.join(rtypes))
             raise ValidationError(entity.eid, problems)
         self.add_info(session, entity, source, extid, complete=False)
-        edited.saved = True
+        edited.saved = entity._cw_is_saved = True
         # prefill entity relation caches
         for rschema in eschema.subject_relations():
             rtype = str(rschema)