Merge commit 'local_master/master'
[plcapi.git] / PLC / Accessors / Factory.py
index 546e3d9..1c6d03e 100644 (file)
@@ -25,9 +25,7 @@ from PLC.PersonTags import PersonTags, PersonTag
 # this is another story..
 #from PLC.Ilinks import Ilink
 
-from PLC.TagTypes import TagTypes, TagType
-
-# known classes : { class -> secondary_key }
+# known classes : { class -> details }
 taggable_classes = { Node : {'table_class' : Nodes,
                              'joins_class' : NodeTags, 'join_class' : NodeTag,
                              'secondary_key': 'hostname'},
@@ -54,7 +52,7 @@ tech_roles = [ 'admin', 'pi', 'tech' ]
 #
 # generates 2 method classes:
 # Get<classname><methodsuffix> (auth, id_or_name) -> value or None
-# Set<classname><methodsuffix> (auth, id_or_name, value) -> None
+# Set<classname><methodsuffix> (auth, id_or_name, value) -> value
 # value is always a string, no cast nor typecheck for now
 #
 # The expose_in_api flag tells whether this tag may be handled
@@ -201,6 +199,7 @@ def define_accessors (module, objclass, methodsuffix, tagname,
         else:
             self.message += " %d "%objs[0][primary_key]
         self.message += "updated"
+        return value
 
     # attach it
     setattr (set_class,"call",set_call)