django-model-utils
django-model-utils copied to clipboard
Name conflict if tracked model has field named "instance"
Problem
If a tracked model has a field called instance, creating a instance of the model throws
TypeError: Model.__init__() got multiple values for argument 'instance'
See issue https://github.com/jazzband/django-model-utils/issues/633
Solution
Removed instance argument from the new model init method and used args[0] instead.
Commandments
- [x] Write PEP8 compliant code.
- [x] Cover it with tests.
- [x] Update
CHANGES.rstfile to describe the changes, and quote according issue withGH-<issue_number>. - [x] Pay attention to backward compatibility, or if it breaks it, explain why.
- [x] Update documentation (if relevant).
Hi, are there any plans to get this change into the upstream? We are being hit with it and wondering about prospective.
@livenson I'm not a maintainer of the repository. I created this PR a while ago and it's been unnoticed ever since.