Ticket #333 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

Changing from ForeignKey to ManyToManyField Causes Indentation Error in backwards()

Reported by: tclancy@… Owned by: andrew
Priority: minor Milestone: 0.7
Component: migrations Version: 0.6.2
Keywords: Cc:


This may be a result of the fact I was adding a new table at the same time I was changing from a FK to a M2M field, but this happened to me twice. The backwards method looks like:

def backwards(self, orm):
        # Deleting model 'ProductPromotion'
    models = {
    # stripped for brevity

which causes the forwards migration to fail given the improper indentation.

Change History

comment:1 Changed 6 years ago by tclancy@…

I just re-attempted this without the (unrelated) new table complication and ran into the same indentation issue.

comment:2 Changed 6 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 0.7

Two questions:

  • What Django version are you running?
  • Are you running off of the 0.6.2 release, or the slightly-different version in trunk?

comment:3 Changed 6 years ago by tclancy@…

Django 1.1.1 - final
0.6.2 according to init.py. Is that the right place to check?

comment:4 Changed 6 years ago by andrew

  • Status changed from assigned to infoneeded

This should be fixed now in 0.7 - could you confirm?

comment:5 Changed 5 years ago by andrew

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

comment:6 Changed 5 years ago by tclancy@…

Sorry, I've been postponing this reminder forever.

Note: See TracTickets for help on using tickets.