| 186 | | cursor.execute("INSERT INTO %s (%s) VALUES (%s)" % \ |
|---|
| 187 | | (backend.quote_name(self._meta.db_table), ','.join(field_names), |
|---|
| 188 | | ','.join(placeholders)), db_values) |
|---|
| 189 | | if self._meta.has_auto_field and not pk_set: |
|---|
| 190 | | setattr(self, self._meta.pk.attname, backend.get_last_insert_id(cursor, self._meta.db_table, self._meta.pk.column)) |
|---|
| | 186 | if db_values: |
|---|
| | 187 | cursor.execute("INSERT INTO %s (%s) VALUES (%s)" % \ |
|---|
| | 188 | (backend.quote_name(self._meta.db_table), ','.join(field_names), |
|---|
| | 189 | ','.join(placeholders)), db_values) |
|---|
| | 190 | if self._meta.has_auto_field and not pk_set: |
|---|
| | 191 | setattr(self, self._meta.pk.attname, backend.get_last_insert_id(cursor, self._meta.db_table, self._meta.pk.column)) |
|---|