File tree Expand file tree Collapse file tree 2 files changed +25
-8
lines changed
drfpasswordless/authtoken Expand file tree Collapse file tree 2 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 1+ # Generated by Django 3.2.18 on 2024-10-17 07:16
2+
3+ from django .conf import settings
4+ from django .db import migrations
5+
6+
7+ class Migration (migrations .Migration ):
8+
9+ dependencies = [
10+ migrations .swappable_dependency (settings .AUTH_USER_MODEL ),
11+ ('authtoken' , '0004_auto_20240927_1224' ),
12+ ]
13+
14+ operations = [
15+ migrations .RemoveConstraint (
16+ model_name = 'token' ,
17+ name = 'unique_device_id_not_null_blank' ,
18+ ),
19+ migrations .AlterUniqueTogether (
20+ name = 'token' ,
21+ unique_together = {('user' , 'device_id' )},
22+ ),
23+ ]
24+
Original file line number Diff line number Diff line change @@ -42,14 +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 = (('key' , 'device_id' ),)
46- constraints = [
47- models .UniqueConstraint (
48- fields = ['device_id' ],
49- name = 'unique_device_id_not_null_blank' ,
50- condition = Q (device_id__isnull = False ) & ~ Q (device_id = '' )
51- )
52- ]
45+ unique_together = (('user' , 'device_id' ),)
5346
5447 def save (self , * args , ** kwargs ):
5548 if not self .key :
You can’t perform that action at this time.
0 commit comments