The model_args variable is used to pass information to functions.
Specially in functions of sub-collections and sub-resources, it is used
to pass the main collections and resources names/classes. The wrapper
update function from control base was not using model_args, then some
resouces might miss this information.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/control/base.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/control/base.py b/src/kimchi/control/base.py
index f50ff6e..8cee06d 100644
--- a/src/kimchi/control/base.py
+++ b/src/kimchi/control/base.py
@@ -151,7 +151,8 @@ class Resource(object):
error = "%s are not allowed to be updated" % invalids
raise cherrypy.HTTPError(405, error)
- ident = update(self.ident, params)
+ args = self.model_args + [params]
+ ident = update(*args)
if ident != self.ident:
uri_params = list(self.model_args[:-1])
uri_params += [urllib2.quote(ident.encode('utf8'))]
--
1.8.5.3
Show replies by date