Skip to content

Commit

Permalink
Model defaults ignored on empty boolean field
Browse files Browse the repository at this point in the history
  • Loading branch information
dilvane committed Sep 16, 2015
1 parent fe4c77c commit 39ef470
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions push_notifications/api/rest_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class DeviceSerializerMixin(ModelSerializer):
class Meta:
fields = ("name", "registration_id", "device_id", "active", "date_created")
read_only_fields = ("date_created", )
extra_kwargs = {"active": {"default": True}}


class APNSDeviceSerializer(ModelSerializer):
Expand Down

0 comments on commit 39ef470

Please sign in to comment.