You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue trying to add value on translation field from api but not working. The TranslatedFields is not appearing on admin and the field in drf is passing as Input is not a valid dict.
The text was updated successfully, but these errors were encountered:
I hack it by adding value on translation field from api as string instead, then json.loads it back by overriding method to_internal_value of class TranslatedFieldsField as show below,
class CustomTranslatedFieldsField(TranslatedFieldsField):
def to_internal_value(self, data):
try:
data = json.loads(data)
except:
self.fail('invalid')
return super().to_internal_value(data)
Django=3.2.6
django-parler=2.2
django-parler-rest=2.1
djangorestframework=3.12.4
Issue trying to add value on translation field from api but not working. The
TranslatedFields
is not appearing on admin and the field in drf is passing asInput is not a valid dict
.The text was updated successfully, but these errors were encountered: