Skip to content

Incorrectly detecting change of zeroes in decimal place #260

Open
@Liamhanninen

Description

First of all this library has been so useful. It's exactly what I needed and works really well. There is only one issue.
It seems to be detecting changes that aren't occurring. At first I thought the model was adding zeros or the db was removing them. But after some digging I think it's a bug with django-auditlog.
It thinks a change occurred anytime I save this record: it thinks that I started with .00 and changed it to .0. But .00 is the existing value and I didn't change anything. I just saved() the record.
image
I checked the output of the form itself in the clean() method:

services_sub_total
44.00
sum_payments
33.00

And then in the database:
image
I just cant figure out where/why this is detecting only one zero in the decimal place - I'm not seeing that .0 anywhere.
Could the delta functions be truncating multiple zeros in the decimals to .0?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions