diff --git a/admin/institutions/views.py b/admin/institutions/views.py index 2c7286fe242b..2c7f399ae686 100644 --- a/admin/institutions/views.py +++ b/admin/institutions/views.py @@ -255,8 +255,9 @@ def form_valid(self, form): if not osf_user: raise Http404(f'OSF user with id "{user_id}" not found. Please double check.') - group = Group.objects.filter(name__startswith=f'institution_{target_institution._id}').first() + osf_user.add_or_update_affiliated_institution(target_institution) + group = Group.objects.filter(name__startswith=f'institution_{target_institution._id}').first() group.user_set.add(osf_user) group.save() diff --git a/osf/migrations/0025_contributor_is_curator_and_more.py b/osf/migrations/0025_institutional_request_access_enabled_and_more.py similarity index 100% rename from osf/migrations/0025_contributor_is_curator_and_more.py rename to osf/migrations/0025_institutional_request_access_enabled_and_more.py diff --git a/osf/migrations/0026_contributor_is_curator_and_more.py b/osf/migrations/0026_add_is_institutional_request_is_curator.py similarity index 89% rename from osf/migrations/0026_contributor_is_curator_and_more.py rename to osf/migrations/0026_add_is_institutional_request_is_curator.py index 84dbbb32bf14..3c597ab68d77 100644 --- a/osf/migrations/0026_contributor_is_curator_and_more.py +++ b/osf/migrations/0026_add_is_institutional_request_is_curator.py @@ -6,7 +6,7 @@ class Migration(migrations.Migration): dependencies = [ - ('osf', '0025_contributor_is_curator_and_more'), + ('osf', 'osf/migrations/0025_institutional_request_access_enabled_and_more'), ] operations = [