georgemarshall / django-cryptography

Easily encrypt data in Django
https://django-cryptography.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
371 stars 70 forks source link

decimal_places doesn't work in DecimalField #61

Closed dz775 closed 2 years ago

dz775 commented 2 years ago

I have a decimal field - amount = encrypt(models.DecimalField(default=0.00, decimal_places=2, max_digits=12)) but when I update the amount to a decimal and retrive it. It goes till max_digits specified (12 digits here). e.g - if the amount is 152.32 I get Decimal('152.320000000')