Skip to content
Snippets Groups Projects
Commit 185f6ce4 authored by ynerant's avatar ynerant
Browse files

Alias have to be exact

parent db69091d
No related branches found
No related tags found
1 merge request!56Corrections
Pipeline #7895 passed with warnings with stages
in 4 minutes and 1 second
......@@ -63,7 +63,7 @@ def save_object(sender, instance, **kwargs):
# IMPORTANT : l'utilisateur dans la VM doit être un des alias note du respo info
ip = "127.0.0.1"
username = Alias.normalize(getpass.getuser())
note = NoteUser.objects.filter(alias__normalized_name__regex="^" + username + "$")
note = NoteUser.objects.filter(alias__normalized_name="^" + username + "$")
if not note.exists():
print("WARNING: A model attempted to be saved in the DB, but the actor is unknown: " + username)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment