Enable auth header to send with just username field filled in

This commit is contained in:
beeankha 2019-07-22 11:03:05 -04:00
parent d66106d380
commit 6ef235dcd5

View File

@ -43,7 +43,7 @@ class WebhookBackend(AWXBaseEmailBackend):
chosen_method = getattr(requests, self.http_method.lower(), None)
for m in messages:
auth = None
if self.username and self.password:
if self.username:
auth = (self.username, self.password)
r = chosen_method("{}".format(m.recipients()[0]),
auth=auth,