Commits

Leonard Ritter committed 8ec552f

* datenwerk schema: fixed python set() on objects

Comments (0)

Files changed (1)

python/datenwerk/templates.py

             return defvalue
         return item
 
+    @classmethod
+    def set(cls, item, key, value):
+        clear(item, key)
+        item.set_key(key, cls.wrap(value))
+
 @add_type
 class ObjectAccessor(Accessor):
     __dw_cls__ = dw.Object
     @classmethod
     def wrap(cls, value):
         return dw.get_item(value)
-
+            
 @add_type
 class ArrayAccessor(Accessor):
     __dw_cls__ = dw.Array