Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#12633 closed (fixed)

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

Reported by: ramiro 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: UI/UX:

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

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by ramiro

Patch implementing fix suggested by Alex Gaynor

comment:1 Changed 4 years ago by ramiro

  • Has patch set
  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


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

 
Note: See TracTickets for help on using tickets.