Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [hotfix/OSIS-9397 => MASTER] L_enregistrement du user dans la table Person pour les comptes temporaires des maîtres de stage ne se fait plus #3445

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions base/models/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ def _update_person_if_necessary(person, user, global_id, birth_date=None):

# In case of temporary user, we don't want to update user data because, OSIS managed it
if global_id and global_id.startswith('8'):
if user and not person.user:
person.user = user
updated = True
super(SerializableModel, person).save()
return updated, person

if user:
Expand Down