File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
drfpasswordless/authtoken Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1- # Generated by Django 3.2.18 on 2024-10-17 05:42
1+ # Generated by Django 3.2.18 on 2024-10-17 07:16
22
3+ from django .conf import settings
34from django .db import migrations
45
56
67class Migration (migrations .Migration ):
78
89 dependencies = [
10+ migrations .swappable_dependency (settings .AUTH_USER_MODEL ),
911 ('authtoken' , '0004_auto_20240927_1224' ),
1012 ]
1113
@@ -14,5 +16,9 @@ class Migration(migrations.Migration):
1416 model_name = 'token' ,
1517 name = 'unique_device_id_not_null_blank' ,
1618 ),
19+ migrations .AlterUniqueTogether (
20+ name = 'token' ,
21+ unique_together = {('user' , 'device_id' )},
22+ ),
1723 ]
1824
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class Meta:
4242 abstract = 'drfpasswordless.authtoken' not in settings .INSTALLED_APPS
4343 verbose_name = _ ("Token" )
4444 verbose_name_plural = _ ("Tokens" )
45+ unique_together = (('user' , 'device_id' ),)
4546
4647 def save (self , * args , ** kwargs ):
4748 if not self .key :
You can’t perform that action at this time.
0 commit comments