Skip to content

Commit

Permalink
fix migrations and admin institutional permissions problems
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Jan 13, 2025
1 parent 78597c8 commit dac0fde
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/institutions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit dac0fde

Please sign in to comment.