mirror of
https://github.com/django/django.git
synced 2025-09-23 02:33:31 +00:00
Fixed #24509 -- Added Expression support to SQLInsertCompiler
This commit is contained in:
parent
6e51d5d0e5
commit
134ca4d438
15 changed files with 247 additions and 67 deletions
|
@ -458,6 +458,8 @@ class QuerySet(object):
|
|||
specifying whether an object was created.
|
||||
"""
|
||||
lookup, params = self._extract_model_params(defaults, **kwargs)
|
||||
# The get() needs to be targeted at the write database in order
|
||||
# to avoid potential transaction consistency problems.
|
||||
self._for_write = True
|
||||
try:
|
||||
return self.get(**lookup), False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue