make options for sources optional
This commit is contained in:
parent
a02b378988
commit
5e33eee5c8
|
@ -156,12 +156,19 @@ class SourcesList(AuthenticatedResource):
|
||||||
:reqheader Authorization: OAuth token to authenticate
|
:reqheader Authorization: OAuth token to authenticate
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
"""
|
"""
|
||||||
|
if "plugin_options" in data["plugin"]:
|
||||||
return service.create(
|
return service.create(
|
||||||
data["label"],
|
data["label"],
|
||||||
data["plugin"]["slug"],
|
data["plugin"]["slug"],
|
||||||
data["plugin"]["plugin_options"],
|
data["plugin"]["plugin_options"],
|
||||||
data["description"],
|
data["description"],
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
return service.create(
|
||||||
|
data["label"],
|
||||||
|
data["plugin"]["slug"],
|
||||||
|
data["description"],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Sources(AuthenticatedResource):
|
class Sources(AuthenticatedResource):
|
||||||
|
|
Loading…
Reference in New Issue