1👍
✅
from decimal import Decimal
attr = getattr(instance, key)
if isinstance(attr, Decimal):
value = Decimal(str(value))
if attr != value:
...
Source:stackexchange.com