arteria / django-openinghours

Allows to define opening hours and to verify if something, for example a store, is currently open.
MIT License
57 stars 38 forks source link

Fix new migration. #28

Open atbradley opened 6 years ago

atbradley commented 6 years ago

The migration 0002_auto_20170915_0912.py fails with projects that don't use the default openinghours.Company model for premises. This revision corrects that issue.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 85.484% when pulling 308ffff6df419c46072d9f302f0bca1fd683117a on atbradley:master into 0a80b43466f69c6c4bfea737c278c2dea0e8c731 on arteria:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 85.484% when pulling 1951ff5678dee9265e9bf436c0f330bc6833f38a on atbradley:master into 0a80b43466f69c6c4bfea737c278c2dea0e8c731 on arteria:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.05%) to 85.531% when pulling fb9834255b55aaa2093a87405578129261331fd1 on atbradley:master into 0a80b43466f69c6c4bfea737c278c2dea0e8c731 on arteria:master.

imposeren commented 6 years ago

Actually I think that "swappable" model is a better approach: conditionally running migrations will cause errors in TestRunner when it will try to serialize data of openinghours.Company model (because app.get_models still has Company model that has no migrations executed for it). See my pull #30

imposeren commented 6 years ago

@atbradley can you check if django-openinghours==0.1.5 solves your issue?