Ticket #1928: bug1928.diff

File bug1928.diff, 778 bytes (added by Geert Vanderkelen, 18 years ago)

Based on Shaun's solution mentioned in the forum thread.

  • management.py

     
    106106    for klass in app_models:
    107107        output, references = _get_sql_model_create(klass, models_output)
    108108        final_output.extend(output)
    109         pending_references.update(references)
     109        for refto, refs in references.iteritems():
     110            try:
     111                pending_references[refto].extend(refs)
     112            except KeyError:
     113                pending_references.update(references)
    110114        final_output.extend(_get_sql_for_pending_references(klass, pending_references))
    111115        # Keep track of the fact that we've created the table for this model.
    112116        models_output.add(klass)
Back to Top