entity.py
branchstable
changeset 9277 c964d8cf6efc
parent 9188 0677e03077fb
child 9283 5f2c5eb1a820
child 9310 80c58c35145f
--- a/entity.py	Thu Oct 10 12:30:35 2013 +0200
+++ b/entity.py	Thu Oct 10 12:42:10 2013 +0200
@@ -1321,7 +1321,8 @@
 
     @deprecated('[3.16] use cw_set() instead of set_attributes()')
     def set_attributes(self, **kwargs): # XXX cw_set_attributes
-        self.cw_set(**kwargs)
+        if kwargs:
+            self.cw_set(**kwargs)
 
     @deprecated('[3.16] use cw_set() instead of set_relations()')
     def set_relations(self, **kwargs): # XXX cw_set_relations
@@ -1332,7 +1333,8 @@
         (meaning that all relations of the given type from or to this object
         should be deleted).
         """
-        self.cw_set(**kwargs)
+        if kwargs:
+            self.cw_set(**kwargs)
 
     @deprecated('[3.13] use entity.cw_clear_all_caches()')
     def clear_all_caches(self):