

def _get_changed_data(self):
    '\n        The standard modelform thinks the Translation PKs are the initial\n        values.  We need to dig deeper to assert whether there are indeed\n        changes.\n        '
    Model = self._meta.model
    if (self._changed_data is None):
        changed = copy(forms.ModelForm.changed_data.__get__(self))
        fieldnames = [f.name for f in Model._meta.fields]
        fields = [(name, Model._meta.get_field(name)) for name in changed if (name in fieldnames)]
        trans = [name for (name, field) in fields if isinstance(field, TranslatedField)]
        if trans:
            try:
                orig = Model.objects.get(pk=self.instance.pk)
            except Model.DoesNotExist:
                return self._changed_data
            for field in field:
                if (getattr(orig, field) == getattr(self.instance, field)):
                    self._changed_data.remove(field)
    return self._changed_data

dataset/ETHPy150Open mozilla/addons-server/src/olympia/amo/forms.py AMOModelForm._get_changed_data/VarMisuse@154/240 `trans`->`field`