mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Avoid using model property in migration
https://stackoverflow.com/a/3315547 Thanks @mmolitor87
This commit is contained in:
parent
07afaf12d5
commit
82ad3821c4
@ -109,7 +109,7 @@ def populate_ownerships(apps, schema_editor):
|
|||||||
for c_id in unique_character_owners:
|
for c_id in unique_character_owners:
|
||||||
ts = tokens.filter(character_id=c_id).order_by('created')
|
ts = tokens.filter(character_id=c_id).order_by('created')
|
||||||
for t in ts:
|
for t in ts:
|
||||||
if t.can_refresh:
|
if t.refresh_token:
|
||||||
# find newest refreshable token and use it as basis for CharacterOwnership
|
# find newest refreshable token and use it as basis for CharacterOwnership
|
||||||
CharacterOwnership.objecs.create_by_token(t)
|
CharacterOwnership.objecs.create_by_token(t)
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user