diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-01-18 11:36:19 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:40:54 +0200 |
commit | f7fc18c5267d745ab754be0039967f53468a3665 (patch) | |
tree | 564af9db675d6b4b6e87c60954665a84b9147483 /ishtar_common/models.py | |
parent | a7977d70f31e1c7b8dbb2c6766124d608d889709 (diff) | |
download | Ishtar-f7fc18c5267d745ab754be0039967f53468a3665.tar.bz2 Ishtar-f7fc18c5267d745ab754be0039967f53468a3665.zip |
✨ GDPR: manage merge action, admin consultation, edition, delete, ✅ GDPR tests
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index b9944e4bb..c978b087b 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3211,11 +3211,12 @@ GDPR_ACTIVITY = ( ("PE", _("Exporting a person's notice")), ("PC", _("Person creation")), ("PM", _("Person modification")), + ("Pm", _("Person merge")), ("PD", _("Person deletion")), ("AC", _("Admin - Directory consultation")), - ("AE", _("Admin - Directory export")), ("AV", _("Admin - Person view")), ("AM", _("Admin - Person modification")), + ("AD", _("Admin - Person deletion")), ) GDPR_ACTIVITY_DICT = dict(GDPR_ACTIVITY) @@ -3299,8 +3300,10 @@ class GDPRLog(models.Model): if start is not None: values = values[start:end] for pk in values: - gdpr_persons.append(cls.persons.through(gdprperson_id=pk, gdprlog_id=log.pk)) - cls.persons.through.objects.bulk_create(gdpr_persons) + if pk: + gdpr_persons.append(cls.persons.through(gdprperson_id=pk, gdprlog_id=log.pk)) + if gdpr_persons: + cls.persons.through.objects.bulk_create(gdpr_persons) class ProfileType(GeneralType): |