Skip to content

Commit

Permalink
Update nautobot_chatops/api/views/lookup.py
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Snasel <[email protected]>
  • Loading branch information
smk4664 and snaselj authored Sep 15, 2023
1 parent 16e6bf7 commit a2fcbff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nautobot_chatops/api/views/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class UserEmailLookupView(View):

def get(self, request, *args, **kwargs):
"""Handle an inbound GET request for a specific access grant value."""
for required_param in ("email", "platform"):
if required_param not in request.GET:
return HttpResponseBadRequest(f"Missing mandatory parameter {required_param}")
missing_params = set(["email", "platform"]) - set(request.GET.keys())
if missing_params:
return HttpResponseBadRequest(f"Missing mandatory parameter(s) {missing_params}")

value = None
for dispatcher_class in Dispatcher.subclasses():
Expand Down

0 comments on commit a2fcbff

Please sign in to comment.