Skip to content
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

Move the default machine type list out from the 0015_machinetype.py migration #628

Open
ddabble opened this issue Apr 2, 2023 · 0 comments

Comments

@ddabble
Copy link
Member

ddabble commented Apr 2, 2023

Having it in the migration is both non-standard practice, and makes it practically difficult to reference in other parts of the code, like in tests (hence the # See the `0015_machinetype.py` migration for which MachineTypes are created by default comments).

The list could e.g. be moved to one of the following:

  • Static field(s) on the MachineType model
  • Fixture file(s) - or, preferably, factory classes - which is the standard practice for default model instances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: TODO
Development

No branches or pull requests

1 participant