bogdal / django-gcm

Google Cloud Messaging Server in Django
https://django-gcm.readthedocs.org
BSD 2-Clause "Simplified" License
98 stars 42 forks source link

Saving device model on unregister endpoint #34

Closed DheerendraRathor closed 8 years ago

DheerendraRathor commented 9 years ago

Hi,

Currently the unregister endpoint is saving the dev_id for marking them inactive. Now the issue is: If some user decides to send false dev_id (without reg_id) to unregister endpoint, The dev_id will be stored with reg_id = null. Now if the same user again send the false dev_id, this will cause IntegrityError: duplicate key value violates unique constraint "gcm_device_reg_id_key" DETAIL: Key (reg_id)=() already exists., which will send repeated mails to django site admin.

I want to know your views on this.

bogdal commented 9 years ago

We should be able to unregister only the existing devices.

bogdal commented 8 years ago

Fixed in 1.1.0 version.