From 0046d4d3e0689ca76cc41fe3fcb68bea31a37fce Mon Sep 17 00:00:00 2001 From: Owocki Date: Sat, 9 Feb 2019 16:28:43 -0700 Subject: [PATCH] debug script --- scripts/debug/migrate_dupe_profile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/debug/migrate_dupe_profile.py b/scripts/debug/migrate_dupe_profile.py index 464271b9472..0259810dada 100644 --- a/scripts/debug/migrate_dupe_profile.py +++ b/scripts/debug/migrate_dupe_profile.py @@ -6,6 +6,10 @@ old_profile = Profile.objects.get(handle__iexact=old_username) new_profile = Profile.objects.get(handle__iexact=new_username) +user = old_profile.user +user.username = new_username +user.save() + new_profile.user = old_profile.user old_profile.user = None old_profile.save()