Ticket #4736: manual_pk_quote_6137.2.dff

File manual_pk_quote_6137.2.dff, 936 bytes (added by Antti Kaihola, 17 years ago)

now uses the new qn() function for quoting

Line 
1Index: django/db/models/base.py
2===================================================================
3--- django/db/models/base.py (revision 6137)
4+++ django/db/models/base.py (working copy)
5@@ -236,7 +236,7 @@
6 db_values = [f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True)) for f in self._meta.fields if not isinstance(f, AutoField)]
7 # If the PK has been manually set, respect that.
8 if pk_set:
9- field_names += [f.column for f in self._meta.fields if isinstance(f, AutoField)]
10+ field_names += [qn(f.column) for f in self._meta.fields if isinstance(f, AutoField)]
11 db_values += [f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True)) for f in self._meta.fields if isinstance(f, AutoField)]
12 placeholders = ['%s'] * len(field_names)
13 if self._meta.order_with_respect_to:
Back to Top