From 3157285e27a426530ef571855e0e29c317e210df Mon Sep 17 00:00:00 2001 From: VIZZARD-X Date: Wed, 26 Nov 2025 14:06:20 +0530 Subject: Fixed #27150 -- Made base File objects truthy by default. --- docs/releases/6.1.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index 00eaf5388d..77188e0c8e 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -500,6 +500,13 @@ Miscellaneous primary key when a ``QuerySet``'s ordering has been forcibly cleared by calling :meth:`~.QuerySet.order_by` with no arguments. +* The :class:`~django.core.files.File` class now always evaluates to ``True`` + in boolean contexts, rather than relying on the ``name`` attribute. The + built-in subclasses ``FieldFile``, ``UploadedFile``, + ``TemporaryUploadedFile``, ``InMemoryUploadedFile``, and + ``SimpleUploadedFile`` retain the previous behavior of evaluating based on + the ``name`` attribute. + .. _deprecated-features-6.1: Features deprecated in 6.1 -- cgit v1.3