vvangelovski / django-audit-log

Audit log for your Django models
Other
232 stars 93 forks source link

fix(audit_log.models.fields.LastUserField): fixed missing `on_delete`… #56

Closed abrahamy closed 3 years ago

abrahamy commented 6 years ago

… positional argument error in d

Django 2.x has a required positional argument named on_delete in django.db.models.ForeignKey which is missing in the current implementation of audit_log. This commit provides a work around by adding a key word argument of the same name in the required position.

MikeSandford commented 6 years ago

I did something less elegant to get this working on my machine for a project so I'm glad to see something here. I was gearing up to make a PR myself but this looks better than what I would have done.

manish2507 commented 5 years ago

After doing all the changes mentioned by you, still CreatingUserField, LastUserField is not working. It is inserting NULL values in DB.