From fcc0bb255730d43ec2cff78fb8b948d6322a8b68 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 29 Oct 2024 11:35:46 +0100 Subject: ✨ permissions refactoring: manage expiration_date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/wizards.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 1da9b9f4d..697c51156 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -2120,13 +2120,17 @@ class AccountWizard(Wizard): if not name: name = profile_type.label + expiration_date = data.get("expiration_date", None) + if profile: profile.name = name profile.profile_type = profile_type + profile.expiration_date = expiration_date profile.save() else: profile, __ = models.UserProfile.objects.get_or_create( - profile_type=profile_type, person=person, name=name + profile_type=profile_type, person=person, name=name, + expiration_date=expiration_date ) area_pks = data.get("area", None) areas = [] -- cgit v1.2.3