gadventures/django-reports-admin

First migration takes an error with

Opened this issue · 3 comments

When I do command manage.py migrate it gives me
File "/home/insomnia/teachbase_proj/lift/venv/lib/python3.8/site-packages/reports/migrations/0001_initial.py", line 31, in Migration
("run_by", models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True)),
TypeError: init() missing 1 required positional argument: 'on_delete'

depending on the django version on_delete is required

Deprecated since version 1.9:
on_delete will become a required argument in Django 2.0. In older versions it defaults to CASCADE.

Facing the same issue - \venv\lib\site-packages\reports\migrations\0001_initial.py", line 31, in Migration
("run_by", models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True)),
TypeError: init() missing 1 required positional argument: 'on_delete'

The older versions required an on delete cascade which is missing in this package:

run_by = models.ForeignKey(
to=settings.AUTH_USER_MODEL,
on_delete=models.SET_NULL,
null=True
)