Browse Source

fixup! [ADD] privacy_consent: Privacy explicit consent tracking tools

pull/11/head
Jairo Llopis 6 years ago
parent
commit
c2ce5b6aa4
  1. 9
      privacy_consent/models/privacy_consent.py

9
privacy_consent/models/privacy_consent.py

@ -143,15 +143,8 @@ class PrivacyConsent(models.Model):
def write(self, vals):
"""Run server action on update."""
# We will check if all draft consents change
changed = self.filtered(lambda one: one.state == "draft")
if "accepted" in vals:
# Also check those whose acceptance is going to change
changed |= self.filtered(
lambda one: one.accepted != vals["accepted"]
)
result = super(PrivacyConsent, self).write(vals)
changed._run_action()
self._run_action()
return result
def message_get_suggested_recipients(self):

Loading…
Cancel
Save