From 392113e5b987ebcf18a352f0331db55dc755f00a Mon Sep 17 00:00:00 2001 From: Francesco Filicetti Date: Wed, 11 Dec 2024 13:19:45 +0100 Subject: [PATCH] fix: bug --- addressbook/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addressbook/utils.py b/addressbook/utils.py index a102f652..143006b1 100644 --- a/addressbook/utils.py +++ b/addressbook/utils.py @@ -10,7 +10,7 @@ def get_personale_data(personale_id, field_to_retrieve='matricola'): - if personale_id[len(personale_id) - 2:] == "==": + if field_to_retrieve == 'matricola' and personale_id[len(personale_id) - 2:] == "==": return decrypt(personale_id) personale_model = apps.get_model("addressbook.Personale")