Modify

Ticket #453 (closed defect: invalid)

Opened 4 years ago

Last modified 4 years ago

'ManyToManyField' object has no attribute _m2m_reverse_column_cache

Reported by: andrew Owned by: andrew
Priority: major Milestone: 0.7.1
Component: commands Version: 0.7
Keywords: Cc:

Description

Apparently caused when removing self-referential M2M. Traceback:

 python manage.py schemamigration --auto common remove_related_topics
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    execute_manager(settings_mod)
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/south/management/commands/schemamigration.py", line 144, in handle
    action.add_backwards(backwards_actions)
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/south/creator/actions.py", line 32, in add_backwards
    backwards.append(self.backwards_code())
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/south/creator/actions.py", line 462, in backwards_code
    return AddM2M.forwards_code(self)
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/south/creator/actions.py", line 431, in forwards_code
    "right_field": self.field.m2m_reverse_name()[:-3], # Remove the _id part
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/django/utils/functional.py", line 55, in _curried
    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "/Users/kennethlove/.virtualenvs/ions/lib/python2.6/site-packages/django/db/models/fields/related.py", line 1006, in _get_m2m_reverse_attr
    return getattr(self, cache_attr)
AttributeError: 'ManyToManyField' object has no attribute '_m2m_reverse_column_cache'

Attachments

Change History

comment:1 Changed 4 years ago by andrew

  • Status changed from new to assigned

comment:2 Changed 4 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to invalid

Traced down to a Django bug in 1.2.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.