Skip to content

Commit

Permalink
Merge pull request #674 from DH-IT-Portal-Development/acceptation
Browse files Browse the repository at this point in the history
Backmerge hotfix to develop
  • Loading branch information
tymees authored Jun 12, 2024
2 parents c4685cc + d2f4256 commit 00e2b22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def process_faculties(self, faculties):
if faculty_obj.users.filter(pk=self.pk).exists():
continue

# Save the user to ensure the user is saved before adding the faculty
self.save()

faculty_obj.users.add(self)
except: # noQA
logger.error(f"Error processing faculty for user", exc_info=True)
Expand Down

0 comments on commit 00e2b22

Please sign in to comment.