Open simonw opened 3 years ago
I experimented with this in #471 and I like it. For consistency, should use this pattern elsewhere in the codebase too:
https://github.com/CAVaccineInventory/vial/blob/d909cfe1875a1ee986c17916468a7789e74ec972/vaccinate/core/models.py#L1083-L1100
https://github.com/CAVaccineInventory/vial/blob/d909cfe1875a1ee986c17916468a7789e74ec972/vaccinate/api/views.py#L775-L786
This would benefit: https://github.com/CAVaccineInventory/vial/blob/d909cfe1875a1ee986c17916468a7789e74ec972/vaccinate/api/views.py#L690-L692
A bigger job is using it for this: https://github.com/CAVaccineInventory/vial/blob/d909cfe1875a1ee986c17916468a7789e74ec972/vaccinate/api/views.py#L53-L120
I experimented with this in #471 and I like it. For consistency, should use this pattern elsewhere in the codebase too:
https://github.com/CAVaccineInventory/vial/blob/d909cfe1875a1ee986c17916468a7789e74ec972/vaccinate/core/models.py#L1083-L1100
https://github.com/CAVaccineInventory/vial/blob/d909cfe1875a1ee986c17916468a7789e74ec972/vaccinate/api/views.py#L775-L786