Skip to content

Conversation

@shemigon
Copy link

@shemigon shemigon commented May 2, 2025

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 #633

Solution

Removed instance argument from the new model init method and used args[0] instead.

Commandments

  • Write PEP8 compliant code.
  • Cover it with tests.
  • Update CHANGES.rst file to describe the changes, and quote according issue with GH-<issue_number>.
  • Pay attention to backward compatibility, or if it breaks it, explain why.
  • Update documentation (if relevant).

@livenson
Copy link

Hi, are there any plans to get this change into the upstream? We are being hit with it and wondering about prospective.

@shemigon
Copy link
Author

@livenson I'm not a maintainer of the repository. I created this PR a while ago and it's been unnoticed ever since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants