LCOGT / mop

Microlensing Observation Portal
GNU General Public License v3.0
0 stars 7 forks source link

Review test suite and ensure changes to MicrolensingEvent class don't break the cronjobs #150

Open rachel3834 opened 4 months ago

rachel3834 commented 4 months ago

Turns out you can't super class a Django model object (in this case Target) without causing issues when you run unittests. The specific error caused was:

File "/data/software/mop_venv/lib/python3.10/site-packages/django/db/migrations/state.py", line 669, in render_multiple
    raise InvalidBasesError(
django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for [<ModelState: 'mop.MicrolensingEvent'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
 in an app with no migrations; see https://docs.djangoproject.com/en/4.2/topics/migrations/#dependencies for more

Since my intention with this new class is actually to create a new model, it is less invasive to remove the superclassing of Target, but I need to verify that this won't break any of the cronjobs, and check that the unittests are running OK.