mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
Fixed #24509 -- Added Expression support to SQLInsertCompiler
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user