Ticket #12728: unenlightened_workaround.diff
File unenlightened_workaround.diff, 810 bytes (added by , 15 years ago) |
---|
-
.py
old new 122 122 style.SQL_TABLE(qn(model._meta.db_table)))) 123 123 break # Only one AutoField is allowed per model, so don't bother continuing. 124 124 for f in model._meta.many_to_many: 125 if not f.rel.through :125 if not f.rel.through and not f.__class__.__name__ == 'GenericRelation': 126 126 output.append("%s setval('%s', coalesce(max(%s), 1), max(%s) %s null) %s %s;" % \ 127 127 (style.SQL_KEYWORD('SELECT'), 128 128 style.SQL_FIELD(qn('%s_id_seq' % f.m2m_db_table())),