Closed kids300 closed 4 years ago
Hi
To be the truth, it looks like a bug in format_field_value
.
From the first view, it should be one big if
condition, not two separate.
This function has been pasted from https://github.com/django/django/blob/master/django/db/models/sql/compiler.py#L1426 when this library has been created (if I'm not mistaken, on django 1.10) and modified a little bit.
Nowadays it's not easy to tell if this bug has been pasted or made here, as source changed greatly.
I'll test it out on weekend and change if possible.
Released 3.1.1
Great, thx!
In django_pg_bulk_update/utils.py(108)format_field_value() value is formated twice: https://github.com/M1hacka/django-pg-bulk-update/blob/5540d1125c9972629fdc08611af36f3eb85fa1fa/src/django_pg_bulk_update/utils.py#L75 and https://github.com/M1hacka/django-pg-bulk-update/blob/5540d1125c9972629fdc08611af36f3eb85fa1fa/src/django_pg_bulk_update/utils.py#L108 I implement a field where the value can only be formatted once before saving (divide by 100):
Can we change the format_field_value behaviour?