From 82ad3821c4db1964a01913d70710dd2f62e45a3a Mon Sep 17 00:00:00 2001 From: Adarnof Date: Thu, 21 Dec 2017 15:15:01 -0500 Subject: [PATCH] Avoid using model property in migration https://stackoverflow.com/a/3315547 Thanks @mmolitor87 --- allianceauth/authentication/migrations/0015_user_profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allianceauth/authentication/migrations/0015_user_profiles.py b/allianceauth/authentication/migrations/0015_user_profiles.py index fd577a07..06e7422f 100644 --- a/allianceauth/authentication/migrations/0015_user_profiles.py +++ b/allianceauth/authentication/migrations/0015_user_profiles.py @@ -109,7 +109,7 @@ def populate_ownerships(apps, schema_editor): for c_id in unique_character_owners: ts = tokens.filter(character_id=c_id).order_by('created') for t in ts: - if t.can_refresh: + if t.refresh_token: # find newest refreshable token and use it as basis for CharacterOwnership CharacterOwnership.objecs.create_by_token(t) break