Ticket #4736: manual_pk_quote.diff
File manual_pk_quote.diff, 874 bytes (added by , 17 years ago) |
---|
-
django/db/models/base.py
232 232 db_values = [f.get_db_prep_save(f.pre_save(self, True)) for f in self._meta.fields if not isinstance(f, AutoField)] 233 233 # If the PK has been manually set, respect that. 234 234 if pk_set: 235 field_names += [ f.columnfor f in self._meta.fields if isinstance(f, AutoField)]235 field_names += [backend.quote_name(f.column) for f in self._meta.fields if isinstance(f, AutoField)] 236 236 db_values += [f.get_db_prep_save(f.pre_save(self, True)) for f in self._meta.fields if isinstance(f, AutoField)] 237 237 placeholders = ['%s'] * len(field_names) 238 238 if self._meta.order_with_respect_to: