django-openinghours
django-openinghours copied to clipboard
Fix new migration.
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.
Coverage remained the same at 85.484% when pulling 308ffff6df419c46072d9f302f0bca1fd683117a on atbradley:master into 0a80b43466f69c6c4bfea737c278c2dea0e8c731 on arteria:master.
Coverage remained the same at 85.484% when pulling 1951ff5678dee9265e9bf436c0f330bc6833f38a on atbradley:master into 0a80b43466f69c6c4bfea737c278c2dea0e8c731 on arteria:master.
Coverage increased (+0.05%) to 85.531% when pulling fb9834255b55aaa2093a87405578129261331fd1 on atbradley:master into 0a80b43466f69c6c4bfea737c278c2dea0e8c731 on arteria:master.
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
@atbradley can you check if django-openinghours==0.1.5 solves your issue?