Adds the ability for destination plugins to be sub-classed from Expor… (#839)

* Adds the ability for destination plugins to be sub-classed from ExportDestination. These plugins have the extra option of specifying an export plugin before the destination receives the data. Closes #807.

* fixing tests
This commit is contained in:
kevgliss
2017-06-26 12:03:24 -07:00
committed by GitHub
parent 541fbc9a6d
commit c05343d58e
11 changed files with 183 additions and 89 deletions

View File

@ -22,6 +22,11 @@ def create(label, plugin_name, options, description=None):
:rtype : Destination
:return: New destination
"""
# remove any sub-plugin objects before try to save the json options
for option in options:
if 'plugin' in option['type']:
del option['value']['plugin_object']
destination = Destination(label=label, options=options, plugin_name=plugin_name, description=description)
return database.create(destination)