mirumee / django-prices

Django fields for the prices module
158 stars 53 forks source link

Add required auto_created flag to TaxedMoneyField, fix code style and bump ver. to Beta 5 #56

Closed rafalp closed 6 years ago

rafalp commented 6 years ago

Before releasing Beta 4 I've cut the auto_created flag from TaxedMoneyField based on what I've looked up on Django source and our test suite. This passed the test, but apparently the flag was required by Django's query building facilities for resolving possible reverse relations.

Code from this PR was tested with local Saleor fork that I'm using to develop price handling update. All tests are now passing with model using this field successfully saving to DB and then deleting from it. I've also tested makemigrations for it and found out that its ignored and its creation on model doesn't cause new migration to appear, which imho is what we want.

codecov[bot] commented 6 years ago

Codecov Report

Merging #56 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #56   +/-   ##
=======================================
  Coverage   96.15%   96.15%           
=======================================
  Files           4        4           
  Lines         104      104           
  Branches       10       10           
=======================================
  Hits          100      100           
  Misses          2        2           
  Partials        2        2

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ac64a97...ed6093d. Read the comment docs.

patrys commented 6 years ago

Was beta4 ever released?

rafalp commented 6 years ago

Yup, 4 hours ago: https://github.com/mirumee/django-prices/releases/tag/1.0.0-beta4