We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a tracked model has the instance field, creating a instance of the model throws
instance
TypeError: Model.__init__() got multiple values for argument 'instance'
class SomeModel(models.Model): name = models.CharField(max_length=100) instance = models.CharField(max_length=100)
model = SomeModel.objects.create(name="test", instance="12.34")
Error Traceback (most recent call last): File "<projectdir>/env/lib/python3.11/site-packages/django/test/utils.py", line 446, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "<projectdir>/tests/testapp/tests/test_model.py", line 273, in test_model_with_instance_property model = SomeModel.objects.create(name="test", instance="test") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<projectdir>/env/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<projectdir>/env/lib/python3.11/site-packages/django/db/models/query.py", line 677, in create obj = self.model(**kwargs) ^^^^^^^^^^^^^^^^^^^^ TypeError: Model.__init__() got multiple values for argument 'instance'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem
If a tracked model has the
instance
field, creating a instance of the model throwsEnvironment
Code examples
The text was updated successfully, but these errors were encountered: