Django

Code

Changeset 766

Show
Ignore:
Timestamp:
10/02/05 13:08:01 (3 years ago)
Author:
rjwittams
Message:

Undo bad fix for #684

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/new-admin/django/core/meta/__init__.py

    r765 r766  
    10361036    this_id = getattr(self, self._meta.pk.column) 
    10371037    cursor = db.db.cursor() 
    1038     delete_stmt = "DELETE FROM %s WHERE %s_id = %%s" % (m2m_table, rel.object_name.lower()) 
    1039     cursor.execute(delete_stmt, [this_id]) 
    1040     insert_stmt = "INSERT INTO %s (%s, %s) VALUES (%%s, %%s)" % (m2m_table, rel.pk.column, rel_opts.pk.column) 
    1041     cursor.executemany(insert_stmt, [(this_id, i) for i in id_list]) 
     1038    cursor.execute("DELETE FROM %s WHERE %s_id = %%s" % (m2m_table, rel.object_name.lower()), [this_id]) 
     1039    sql = "INSERT INTO %s (%s_id, %s_id) VALUES (%%s, %%s)" % (m2m_table, rel.object_name.lower(), rel_opts.object_name.lower()) 
     1040    cursor.executemany(sql, [(this_id, i) for i in id_list]) 
    10421041    db.db.commit() 
    10431042 
     
    14901489    return man 
    14911490 
    1492 def manipulator_init(opts, add, change, self, obj_key=None, follow=None): 
     1491def manipulator_init(opts, add, change, self, obj_key=None): 
    14931492    if change: 
    14941493        assert obj_key is not None, "ChangeManipulator.__init__() must be passed obj_key parameter."