jazzband / django-push-notifications

Send push notifications to mobile devices through GCM or APNS in Django.
MIT License
2.24k stars 605 forks source link

fix hardcoded AUTH_USER_MODEL in migrations #677

Closed joeyorlando closed 1 year ago

joeyorlando commented 1 year ago

Hi there 👋

Great project! I wanted to contribute to fixing a "bug" I realized in the migrations. When you set USER_MODEL as such in your settings.py:

PUSH_NOTIFICATIONS_SETTINGS = {
    "USER_MODEL": "user_management.User",
   ...
}

the migrations still create a foreign key reference to the value of AUTH_USER_MODEL.

This PR would update that to use the value of settings.PUSH_NOTIFICATION_SETTINGS["USER_MODEL"]

joeyorlando commented 1 year ago

It seems like this may be a duplicate of #572 .. but any way one of these can be merged in and released? 😄

joeyorlando commented 1 year ago

closing in favour of #572