Allow extra_data__field_name params in update and create
Review Request #7669 — Created Oct. 1, 2015 and submitted
The resource
create
andupdate
methods now accept keyword arguments
of the formextra_data__field_name
which are rewritten to
extra_data.field_name
so that Review Board can understand them. This
occurs becauseextra_data.field_name
cannot be used as a keyword
argument, so all extra data field updates have to built into a dict,
which must then be splatted into the appropriate method.Unit tests have been updated that cover both methods.
Ran unit tests.
-
This will be a way more intuitive way to provide extra data. And the comment block is descriptive and easily understood.
Looks good to me. ^^
-
-
-
rbtools/api/resource.py (Diff revision 1) Hmm, we're repeating quite a bit of code here. Let's get all this moved into a utility function.