Skip to content

Commit

Permalink
fix: reindex when subjects update
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Aug 14, 2023
1 parent 42879e6 commit 307ffd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osf/models/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,8 @@ def set_subjects(self, new_subjects, auth, add_log=True):
self.add_subjects_log(old_subjects, auth)

self.save()
if hasattr(self, 'update_search'):
self.update_search()

def set_subjects_from_relationships(self, subjects_list, auth, add_log=True):
""" Helper for setting M2M subjects field from list of flattened subjects received from UI.
Expand All @@ -1161,6 +1163,8 @@ def set_subjects_from_relationships(self, subjects_list, auth, add_log=True):
self.add_subjects_log(old_subjects, auth)

self.save()
if hasattr(self, 'update_search'):
self.update_search()

def map_subjects_between_providers(self, old_provider, new_provider, auth=None):
"""
Expand Down

0 comments on commit 307ffd0

Please sign in to comment.