mpkasp / django-bom

A simple bill of materials app built using the django web framework.
GNU General Public License v3.0
105 stars 40 forks source link

Update reference to User model in Organization and UserMeta models to `settings.AUTH_USER_MODEL` #98

Closed princess-fixturfab closed 1 year ago

princess-fixturfab commented 1 year ago

In django 3.2, Referencing the User Model:

If you reference [User](https://docs.djangoproject.com/en/3.2/ref/contrib/auth/#django.contrib.auth.models.User) 
directly (for example, by referring to it in a foreign key), your code will not work in projects where the
[AUTH_USER_MODEL](https://docs.djangoproject.com/en/3.2/ref/settings/#std-setting-AUTH_USER_MODEL) 
setting has been changed to a different user model.

This includes the owner field in Organization model and user field in UserMeta model.