diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-01-18 11:36:19 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-10 14:45:20 +0100 |
commit | 13cff2b11a06c9ed334c6bad96ce14a7e3d629d8 (patch) | |
tree | 97fa08bfda014a128ce7fe161695e8123b221cea /ishtar_common/models.py | |
parent | 7293985b9d83bed4130a677521ef72d4759202c3 (diff) | |
download | Ishtar-13cff2b11a06c9ed334c6bad96ce14a7e3d629d8.tar.bz2 Ishtar-13cff2b11a06c9ed334c6bad96ce14a7e3d629d8.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): |