Open renzosunico opened 7 years ago
Hello @renzosunico , sorry for very late reply , is this error coming in the new django-fcm 0.1.1 version ?
I have this same issue on 0.1.1. It looks like the root cause is that when you modify the Device model, the fields
of the corresponding DeviceSerializer stay the same.
A quick fix would be to make a change in https://github.com/Chitrank-Dixit/django-fcm/blob/master/fcm/serializers.py#L9
fields = ('dev_id', 'reg_id', 'name', 'is_active')
to
fields = '__all__'
and https://github.com/Chitrank-Dixit/django-fcm/blob/master/fcm/admin.py#L14
list_display = ['dev_id', 'name', 'is_active']
to
list_display = [f.name for f in Device._meta.fields if f.name != "id" if f.name != "reg_id"]
I have these changes ready in a PR I will add to this repo if you'd like to add me as a collaborator.
I can no longer use the registration url after extending device model since I have a non nullable user field.