entity.py
changeset 9283 5f2c5eb1a820
parent 9261 1dfe62a9da50
parent 9277 c964d8cf6efc
child 9293 723e2c586ea3
--- a/entity.py	Wed Oct 09 11:13:56 2013 +0200
+++ b/entity.py	Thu Oct 10 13:26:11 2013 +0200
@@ -1307,7 +1307,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
@@ -1318,7 +1319,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):