diff --git a/push_notifications/api/rest_framework.py b/push_notifications/api/rest_framework.py index d09a1e0..fae5ecf 100644 --- a/push_notifications/api/rest_framework.py +++ b/push_notifications/api/rest_framework.py @@ -39,6 +39,9 @@ class Meta: fields = ("name", "registration_id", "device_id", "active", "date_created") read_only_fields = ("date_created", ) + # See https://github.com/tomchristie/django-rest-framework/issues/1101 + extra_kwargs = {"active": {"default": True}} + class APNSDeviceSerializer(ModelSerializer):