diff options
author | Filipp Lepalaan <filipp@mac.com> | 2021-05-12 15:09:06 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2021-05-12 15:09:06 +0300 |
commit | 0d01e3a1daf608addb737101b073fd1890ba7c6a (patch) | |
tree | 082c71df6212963b29c35bd35e2288ec3c5004e3 /servo/models/account.py | |
parent | 6672d03666fdf6fae3b2a074c75ac20f5dbd0ba7 (diff) | |
download | Servo-0d01e3a1daf608addb737101b073fd1890ba7c6a.tar.gz Servo-0d01e3a1daf608addb737101b073fd1890ba7c6a.tar.bz2 Servo-0d01e3a1daf608addb737101b073fd1890ba7c6a.zip |
Stop using Sites, Django 3 fixes
Diffstat (limited to 'servo/models/account.py')
-rw-r--r-- | servo/models/account.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/servo/models/account.py b/servo/models/account.py index d4549c6..b86c877 100644 --- a/servo/models/account.py +++ b/servo/models/account.py @@ -7,7 +7,7 @@ from django.conf import settings from pytz import common_timezones from django.core.cache import cache -from django.core.urlresolvers import reverse +from django.urls import reverse from rest_framework.authtoken.models import Token from mptt.fields import TreeForeignKey @@ -39,6 +39,7 @@ class User(AbstractUser): Customer, null=True, blank=True, + on_delete=models.SET_NULL, limit_choices_to={'is_company': True} ) @@ -55,7 +56,7 @@ class User(AbstractUser): Location, null=True, related_name='+', - on_delete=models.PROTECT, + on_delete=models.SET_NULL, verbose_name=_('Current Location'), help_text=_('Orders you create will be registered to this location.') ) |