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
After adding a SortedOneToManyField to my model and running makemigrations I see the following exception.
Traceback (most recent call last):
File "./manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models()
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/Users/rconnon/src/test_project/test_app/models.py", line 9, in <module>
class B (models.Model):
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/django/db/models/base.py", line 162, in __new__
new_class.add_to_class(obj_name, obj)
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/django/db/models/base.py", line 331, in add_to_class
value.contribute_to_class(cls, name)
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/sortedm2m/fields.py", line 265, in contribute_to_class
rel.through = self.create_intermediate_model(cls)
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/sortedm2m/fields.py", line 410, in create_intermediate_model
return self.create_intermediate_model_from_attrs(klass, attrs)
File "/Users/rconnon/.virtualenvs/bin/django/lib/python3.6/site-packages/sortedm2m/fields.py", line 386, in create_intermediate_model_from_attrs
base_classes = (self.base_class, models.Model) if self.base_class else (models.Model,)
AttributeError: 'SortedOneToManyField' object has no attribute 'base_class'
The text was updated successfully, but these errors were encountered:
After adding a SortedOneToManyField to my model and running makemigrations I see the following exception.
The text was updated successfully, but these errors were encountered: