API, history contents: allow 'source' in payload

In create, checks both kwd and payload for 'source' parameter when
creating a new hdca. This allows source to be passed in the body and
not query string.

This fixes the copy call in history-contents when copying an hdca
by drag and drop in the multi history view.
This commit is contained in:
carlfeberhard
2016-08-17 13:08:27 -04:00
parent 8d512c98e2
commit bf9a15389e
5 changed files with 31 additions and 30 deletions
@@ -315,7 +315,7 @@ class HistoryContentsController( BaseAPIController, UsesLibraryMixin, UsesLibrar
return rval
def __create_dataset_collection( self, trans, history, payload, **kwd ):
source = kwd.get("source", "new_collection")
source = kwd.get( "source", payload.get( "source", "new_collection" ) )
service = trans.app.dataset_collections_service
if source == "new_collection":
create_params = api_payload_to_create_params( payload )
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long