try to fix app_gw being null

This commit is contained in:
Jens Langhammer 2019-04-11 15:30:07 +02:00
parent 61478db94e
commit 755045b226
1 changed files with 2 additions and 2 deletions

View File

@ -77,11 +77,11 @@ class ApplicationGatewayMiddleware:
try:
# Check if ApplicationGateway is associated with application
getattr(app_gw, 'application')
if app_gw:
return False, app_gw
except Application.DoesNotExist:
LOGGER.debug("ApplicationGateway not associated with Application")
return True, None
return True, None
def __call__(self, request):
forward, self.app_gw = self.precheck(request)