mirror of https://gitlab.crans.org/bde/nk20
Alias have to be exact
This commit is contained in:
parent
db69091d9f
commit
185f6ce4e3
|
@ -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
|
# IMPORTANT : l'utilisateur dans la VM doit être un des alias note du respo info
|
||||||
ip = "127.0.0.1"
|
ip = "127.0.0.1"
|
||||||
username = Alias.normalize(getpass.getuser())
|
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():
|
if not note.exists():
|
||||||
print("WARNING: A model attempted to be saved in the DB, but the actor is unknown: " + username)
|
print("WARNING: A model attempted to be saved in the DB, but the actor is unknown: " + username)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue