Opened 9 years ago

Closed 9 years ago

Last modified 7 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: master
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 and

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 9 years ago.
Patch implementing fix suggested by Alex Gaynor

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by Ramiro Morales

Attachment: 12633.diff added

Patch implementing fix suggested by Alex Gaynor

comment:1 Changed 9 years ago by Ramiro Morales

Has patch: set
milestone: 1.2

comment:2 Changed 9 years ago by Russell Keith-Magee

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 Changed 7 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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