summaryrefslogtreecommitdiff
path: root/tests/auth_tests/models/with_foreign_key.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auth_tests/models/with_foreign_key.py')
-rw-r--r--tests/auth_tests/models/with_foreign_key.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auth_tests/models/with_foreign_key.py b/tests/auth_tests/models/with_foreign_key.py
index 21addfc589..2288662905 100644
--- a/tests/auth_tests/models/with_foreign_key.py
+++ b/tests/auth_tests/models/with_foreign_key.py
@@ -18,9 +18,9 @@ class CustomUserWithFKManager(BaseUserManager):
class CustomUserWithFK(AbstractBaseUser):
- username = models.ForeignKey(Email, related_name='primary')
- email = models.ForeignKey(Email, to_field='email', related_name='secondary')
- group = models.ForeignKey(Group)
+ username = models.ForeignKey(Email, models.CASCADE, related_name='primary')
+ email = models.ForeignKey(Email, models.CASCADE, to_field='email', related_name='secondary')
+ group = models.ForeignKey(Group, models.CASCADE)
custom_objects = CustomUserWithFKManager()