summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/resources/handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/resources/handlers.py')
-rw-r--r--utils/test/testapi/opnfv_testapi/resources/handlers.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/test/testapi/opnfv_testapi/resources/handlers.py b/utils/test/testapi/opnfv_testapi/resources/handlers.py
index 5f6c3df57..a2628e249 100644
--- a/utils/test/testapi/opnfv_testapi/resources/handlers.py
+++ b/utils/test/testapi/opnfv_testapi/resources/handlers.py
@@ -172,8 +172,7 @@ class GenericApiHandler(RequestHandler):
.format(new_query, self.table))
# we merge the whole document """
- edit_request = data.format()
- edit_request.update(self._update_requests(data))
+ edit_request = self._update_requests(data)
""" Updating the DB """
yield self._eval_db(self.table, 'update', query, edit_request,
@@ -188,7 +187,10 @@ class GenericApiHandler(RequestHandler):
data.__getattribute__(k))
if not request:
raise HTTPError(HTTP_FORBIDDEN, "Nothing to update")
- return request
+
+ edit_request = data.format()
+ edit_request.update(request)
+ return edit_request
@staticmethod
def _update_request(edit_request, key, new_value, old_value):