Skip to content

Commit

Permalink
dupe profile
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Dec 4, 2018
1 parent a048bd3 commit 1bae812
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/debug/migrate_dupe_profile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
old_username='x'
new_username='y'
from dashboard.management.commands import cleanup_dupe_profiles
from dashboard.models import Profile

old_profile = Profile.objects.get(handle__iexact=old_username)
new_profile = Profile.objects.get(handle__iexact=new_username)

new_profile.user = old_profile.user
old_profile.user = None
old_profile.save()
new_profile.save()

cleanup_dupe_profiles.combine_profiles(old_profile, new_profile)

0 comments on commit 1bae812

Please sign in to comment.