def clean_target_f(self): value = self.cleaned_data['target_f'] if self.instance.target.strings != multistring(value or [u'']): self.instance._target_updated = True self.updated_fields.append((SubmissionFields.TARGET, to_db(self.instance.target), to_db(value))) return value
def clean_target_f(self): value = self.cleaned_data['target_f'] if self.instance.target.strings != multistring(value or [u'']): self.instance._target_updated = True self.updated_fields.append( (SubmissionFields.TARGET, to_db(self.instance.target), to_db(value))) return value
def clean_source_f(self): value = self.cleaned_data['source_f'] if self.instance.source.strings != value: self.instance._source_updated = True self.updated_fields.append((SubmissionFields.SOURCE, to_db(self.instance.source), to_db(value))) if snplurals == 1: # plural with single form, insert placeholder value.append(PLURAL_PLACEHOLDER) return value
def clean_source_f(self): value = self.cleaned_data['source_f'] if self.instance.source.strings != value: self.instance._source_updated = True self.updated_fields.append( (SubmissionFields.SOURCE, to_db(self.instance.source), to_db(value))) if snplurals == 1: # Plural with single form, insert placeholder. value.append(PLURAL_PLACEHOLDER) return value
def clean_target_f(self): value = self.cleaned_data['target_f'] if self.instance.target.strings != multistring(value or [u'']): self.instance._target_updated = True self.updated_fields.append(("pootle_store.Unit.target", to_db(self.instance.target), to_db(value))) return value