When the field in the model has _id in the end (that is named like order_id) such field is not deserialized correctly and is always empty.
Cause
This is caused by the code in the deserialization that attempts to handle the difference between model fields names and DB column names specifically for the associations which usually are named like order by the underlying DB column name is order_id. The code just cuts _id off and uses the result as a field name.
This works correctly for the association fields but breaks when the field name geniunly ends with _id but is not an association.
Solution
Use the column name from the django model meta for the translation.
This is based on https://github.com/Opus10/django-pgpubsub/pull/49
Problem
When the field in the model has
_id
in the end (that is named likeorder_id
) such field is not deserialized correctly and is always empty.Cause
This is caused by the code in the deserialization that attempts to handle the difference between model fields names and DB column names specifically for the associations which usually are named like
order
by the underlying DB column name isorder_id
. The code just cuts_id
off and uses the result as a field name.This works correctly for the association fields but breaks when the field name geniunly ends with
_id
but is not an association.Solution
Use the column name from the django model meta for the translation.