[Answer]-Django max aggregate comparison issue

1👍

You might want to take a look at this SO discussion for more information, but the short version is that Decimal(hr) == Decimal('25.123400000000000176214598468504846096038818359375')

In order to create a Decimal with the exact value you want, you have to use the string representation of the float. prev_hourly_rate['hourlyRate__max'] == Decimal(repr(hr)) should get you what you want.

👤Hamms

Leave a comment