You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During work on updating Saleor's codebase to use current prices, I've ran into plenty of edge cases with Django ORM accessing different attributes on TaxedMoneyField instances when running different operations.
Those could've been found much sooner if our test suite included following scenarios:
model.save()
model.save(update_fields)
model.delete()
We should also explore how behavior of those changes for models that are:
pointed to by ForeignKey in other model
are pointing to other model via ForeignKey
This is because Django's ORM appears to look up related models fields, iterating on them and snooping out different attrs for its checks and validations.
The text was updated successfully, but these errors were encountered:
During work on updating Saleor's codebase to use current prices, I've ran into plenty of edge cases with Django ORM accessing different attributes on
TaxedMoneyField
instances when running different operations.Those could've been found much sooner if our test suite included following scenarios:
model.save()
model.save(update_fields)
model.delete()
We should also explore how behavior of those changes for models that are:
ForeignKey
in other modelForeignKey
This is because Django's ORM appears to look up related models fields, iterating on them and snooping out different attrs for its checks and validations.
The text was updated successfully, but these errors were encountered: