summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-05-11 18:22:55 +0200
committerGitHub <noreply@github.com>2023-05-11 18:22:55 +0200
commit72a86ceb33749d4fd17d3d2910e19b9d9ca1643b (patch)
tree8cc73d35de117ae7e9239de71923d77221acf631 /django
parent2b11740e1d9d23ef53d94a1c45896fb7b91df908 (diff)
downloaddjango-72a86ceb33749d4fd17d3d2910e19b9d9ca1643b.tar.gz
Fixed #34558 -- Fixed QuerySet.bulk_create() crash with Now() on Oracle.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/functions/datetime.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/models/functions/datetime.py b/django/db/models/functions/datetime.py
index baed94227a..eb5332ecc0 100644
--- a/django/db/models/functions/datetime.py
+++ b/django/db/models/functions/datetime.py
@@ -236,6 +236,11 @@ class Now(Func):
**extra_context,
)
+ def as_oracle(self, compiler, connection, **extra_context):
+ return self.as_sql(
+ compiler, connection, template="LOCALTIMESTAMP", **extra_context
+ )
+
class TruncBase(TimezoneMixin, Transform):
kind = None