diff --git a/lemur/sources/views.py b/lemur/sources/views.py index 3b4deab7..bc104e33 100644 --- a/lemur/sources/views.py +++ b/lemur/sources/views.py @@ -156,12 +156,19 @@ class SourcesList(AuthenticatedResource): :reqheader Authorization: OAuth token to authenticate :statuscode 200: no error """ - return service.create( - data["label"], - data["plugin"]["slug"], - data["plugin"]["plugin_options"], - data["description"], - ) + if "plugin_options" in data["plugin"]: + return service.create( + data["label"], + data["plugin"]["slug"], + data["plugin"]["plugin_options"], + data["description"], + ) + else: + return service.create( + data["label"], + data["plugin"]["slug"], + data["description"], + ) class Sources(AuthenticatedResource):