def save(self, commit=True): ob = super(PolicyForm, self).save(commit) for k, field in (('has_eula', 'eula'), ('has_priv', 'privacy_policy')): if not self.cleaned_data[k]: delete_translation(self.instance, field) if 'privacy_policy' in self.changed_data: amo.log(amo.LOG.CHANGE_POLICY, self.addon, self.instance) return ob
def save(self, commit=True): obj = super(DescribeForm, self).save(commit) if not self.cleaned_data['has_priv']: delete_translation(self.instance, 'privacy_policy') return obj