Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#12633 closed (fixed)

Access to creates_table manyToManyField attribute leftover from before the r11710 automatic throuth model change

Reported by: Ramiro Morales Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

http://code.djangoproject.com/browser/django/trunk/django/db/backends/creation.py?rev=12252#L160 and http://code.djangoproject.com/browser/django/trunk/django/db/backends/creation.py?rev=12252#L311

The sql_for_many_to_many_field and sql_destroy_many_to_many methods aren't called from anywhere in Django code anymore but were kept for backward compatibility with third-party code.

They will just always raise:

AttributeError: 'ManyToManyField' object has no attribute 'creates_table'

Attachments (1)

12633.diff (932 bytes ) - added by Ramiro Morales 15 years ago.
Patch implementing fix suggested by Alex Gaynor

Download all attachments as: .zip

Change History (4)

by Ramiro Morales, 15 years ago

Attachment: 12633.diff added

Patch implementing fix suggested by Alex Gaynor

comment:1 by Ramiro Morales, 15 years ago

Has patch: set
milestone: 1.2

comment:2 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [12262]) Fixed #12633 -- Modified some old m2m attribute use in deprecated m2m table creation methods. Also added PendingDeprecation warnings to those methods. Thanks to Alex for the suggestion, and Ramiro for the report and fix.

comment:3 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top