diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-10-29 11:35:46 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:43:48 +0100 |
commit | fcc0bb255730d43ec2cff78fb8b948d6322a8b68 (patch) | |
tree | 5d5fc4320ccd22f8449c38dd2ed924b007f2ef6c /ishtar_common/wizards.py | |
parent | da5e25c0b312b2c19db6898ee0f9e54b86b9d700 (diff) | |
download | Ishtar-fcc0bb255730d43ec2cff78fb8b948d6322a8b68.tar.bz2 Ishtar-fcc0bb255730d43ec2cff78fb8b948d6322a8b68.zip |
✨ permissions refactoring: manage expiration_date
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 = [] |