From 72a86ceb33749d4fd17d3d2910e19b9d9ca1643b Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 11 May 2023 18:22:55 +0200 Subject: Fixed #34558 -- Fixed QuerySet.bulk_create() crash with Now() on Oracle. --- django/db/models/functions/datetime.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'django') 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 -- cgit v1.2.1