Ticket #1459: m2m-fix.diff

File m2m-fix.diff, 644 bytes (added by Malcolm Tredinnick <malcolm@…>, 19 years ago)

Fix many-to-many relations for SQLite (without breaking others)

  • django/db/models/fields/related.py

     
    221221        (target_col_name, join_table, source_col_name,
    222222        target_col_name, ",".join(['%s'] * len(new_ids))),
    223223        [source_pk_val] + list(new_ids))
    224     if cursor.rowcount is not None and cursor.rowcount > 0:
     224    if cursor.rowcount is not None and cursor.rowcount != 0:
    225225        existing_ids = set([row[0] for row in cursor.fetchmany(cursor.rowcount)])
    226226    else:
    227227        existing_ids = set()
Back to Top