We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 82f21c6 + 3a62f8a commit 2ec823aCopy full SHA for 2ec823a
fcm_django/api/rest_framework.py
@@ -64,7 +64,7 @@ def validate(self, attrs):
64
devices = Device.objects.filter(
65
registration_id=attrs["registration_id"]) \
66
.exclude(id=primary_key)
67
- if (attrs["active"]):
+ if (attrs.get('active', False)):
68
devices.filter(~Q(user=user)).update(active=False)
69
devices = devices.filter(user=user)
70
else:
0 commit comments