Skip to content

Conversation

AyushDharDubey
Copy link
Collaborator

Closes #60

This PR adds migration 0007 to update any UserSocialAuth instances having provider value as openstreetmap to openstreetmap-oauth2.

Simulated the error and fix over my local setup.

@AyushDharDubey
Copy link
Collaborator Author

Prior to running this migration on prod, we will need to ensure that any duplicate user instances created between the last deployment and now are removed.
This will need manual inspection of User.objects.all(). Hint: The latest objects with usernames like AyushDharDubey1f28543855624388, (which have a hash appended) are most likely our targets.
Deleting the duplicate User objects will automatically cascade and clean up related entries in social_django.

@lonvia lonvia merged commit e81460a into fossgis:main Sep 2, 2025
1 check passed
@lonvia
Copy link
Collaborator

lonvia commented Sep 2, 2025

Deployed. All good now.

@AyushDharDubey AyushDharDubey deleted the fix/issue_60-update-existing-user's-usersocialauth-provider branch September 2, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MultipleObjectsReturned at /user/ when accessing user page
2 participants