You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the following stack trace and I'm not sure why. It seems like such a simple case -- just creating an object.
Traceback (most recent call last):
[...]
File ".../testing/mock_data.py", line 194, in _add_run
run = Run.objects.create(
^^^^^^^^^^^^^^^^^^^
File ".../.venv/lib/python3.11/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../.venv/lib/python3.11/site-packages/django/db/models/query.py", line 453, in create
obj.save(force_insert=True, using=self.db)
File ".../models/run.py", line 127, in save
super().save(*args, **kwargs)
File ".../.venv/lib/python3.11/site-packages/django/db/models/base.py", line 739, in save
self.save_base(using=using, force_insert=force_insert,
File ".../.venv/lib/python3.11/site-packages/model_utils/tracker.py", line 373, in inner
tracker = getattr(instance, self.attname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Run' object has no attribute '_tracker'
Removing my own save() didn't help
The class is derived directly from models.Model and tracker = FieldTracker() is after all of the fields.
Is there any other debugging or tracing I could provide to show why _tracker isn't added to the class?
Environment
Django Model Utils version: 4.3.1
Django version: 3.2.19
Python version: 3.11
Other libraries used, if any:
Code examples
Give code example that demonstrates the issue, or even better, write new tests that fails because of that issue.
I'm going to try some tracing to provide more info.
The text was updated successfully, but these errors were encountered:
Problem
I'm getting the following stack trace and I'm not sure why. It seems like such a simple case -- just creating an object.
Removing my own save() didn't help
The class is derived directly from models.Model and tracker = FieldTracker() is after all of the fields.
Is there any other debugging or tracing I could provide to show why _tracker isn't added to the class?
Environment
Code examples
Give code example that demonstrates the issue, or even better, write new tests that fails because of that issue.
I'm going to try some tracing to provide more info.
The text was updated successfully, but these errors were encountered: