check for application and streamkey combination instead of separately

This commit is contained in:
Jan Koppe 2020-04-20 18:55:45 +02:00
parent bda78d892a
commit 59fa9df2ad
Signed by: thunfisch
GPG Key ID: BE935B0735A2129B
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ def callback(request):
except KeyError:
return HttpResponse('1', status=401)
try:
app = models.Application.objects.get(name=app_name)
streamkey = models.Streamkey.objects.get(key=stream_name)
application = models.Application.objects.get(name=app_name)
streamkey = models.Streamkey.objects.get(key=stream_name, application=application)
except ObjectDoesNotExist:
return HttpResponse('1', status=401)