-
Notifications
You must be signed in to change notification settings - Fork 3
Fix departments and schools fixtures #1453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| # load required fixtures on development by default | ||
| python3 manage.py loaddata platforms schools departments offered_by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The block above was never running. We don't expose NODE_ENV to the web container, nor have we for a while now.
Since run-django-dev.sh is ...for dev ... it seems OK to just always run this line.
That said, also happy to remove this (and restore it to the README).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, I think. I can't imagine a scenario where you would need to preserve manual edits to any of this data in development, but it might be best to add a quick note to the "Loading fixture files" section of the readme. There's a note about how it's automatically done for you in development, so maybe just elaborate upon that and say that in development data is loaded from fixtures every time, which is what this would do as far as I understand.
gumaerc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this was my fault! It looks like I accidentally removed these when running dumpdata. I updated the department names in that PR in Django admin, then used dumpdata to regenerate the JSON but apparently missed that it removed these dates. Thanks for fixing that. Anyway, I just have one small suggestion:
| # load required fixtures on development by default | ||
| python3 manage.py loaddata platforms schools departments offered_by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, I think. I can't imagine a scenario where you would need to preserve manual edits to any of this data in development, but it might be best to add a quick note to the "Loading fixture files" section of the readme. There's a note about how it's automatically done for you in development, so maybe just elaborate upon that and say that in development data is loaded from fixtures every time, which is what this would do as far as I understand.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/5263
Description (What does it do?)
This PR fixes some fixtures. Currently, the
schools.jsonanddepartments.jsonfixtures are not usable—thecreated_onandupdated_onfields are missing. (They were removed in #1253.)How can this be tested?
main, run./manage.py loaddata schools. It will fail./manage.py loaddata schools. It will succeed.