예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
    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
예제 #4
0
파일: forms.py 프로젝트: Osmose/olympia
    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