Skip to content

Commit 700838a

Browse files
committed
Merge branch 'hotfix/26.1.8'
2 parents 525a70c + 1f41baa commit 700838a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

osf/models/user.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,7 @@ def add_or_update_affiliated_institution(self, institution, sso_identity=None, s
17651765
sso_department=sso_department,
17661766
sso_other_attributes={}
17671767
)
1768+
self.update_search()
17681769
return affiliation
17691770
# CASE 2: affiliation exists
17701771
updated = False
@@ -1783,6 +1784,7 @@ def add_or_update_affiliated_institution(self, institution, sso_identity=None, s
17831784
return None
17841785
# CASE 1.3: at least one attribute is updated -> return the affiliation
17851786
affiliation.save()
1787+
self.update_search()
17861788
return affiliation
17871789

17881790
def remove_sso_identity_from_affiliation(self, institution):
@@ -1791,6 +1793,7 @@ def remove_sso_identity_from_affiliation(self, institution):
17911793
affiliation = InstitutionAffiliation.objects.get(user__id=self.id, institution__id=institution.id)
17921794
affiliation.sso_identity = None
17931795
affiliation.save()
1796+
self.update_search()
17941797
return affiliation
17951798

17961799
def copy_institution_affiliation_when_merging_user(self, user):
@@ -1832,6 +1835,8 @@ def remove_affiliated_institution(self, institution_id):
18321835
group = affiliation.institution.get_group('institutional_admins')
18331836
group.user_set.remove(self)
18341837
group.save()
1838+
1839+
self.update_search()
18351840
return True
18361841

18371842
def remove_all_affiliated_institutions(self):

0 commit comments

Comments
 (0)