8000 Removed unreachable condition in TruncBase.convert_value() · django/django@cbe5b92 · GitHub
[go: up one dir, main page]

Skip to content

Commit cbe5b92

Browse files
committed
Removed unreachable condition in TruncBase.convert_value()
Incorrectly added in 34d6bce.
1 parent 96c79be commit cbe5b92

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

django/db/models/functions/datetime.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,7 @@ def convert_value(self, value, expression, connection):
355355
"zone definitions for your database installed?"
356356
)
357357
elif isinstance(value, datetime):
358-
if value is None:
359-
pass
360-
elif isinstance(self.output_field, DateField):
358+
if isinstance(self.output_field, DateField):
361359
value = value.date()
362360
elif isinstance(self.output_field, TimeField):
363361
value = value.time()

0 commit comments

Comments
 (0)
0