diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-01-17 22:09:56 +0100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-01-20 14:07:28 +0100 |
| commit | f5772de69679efb54129ac1cbca3579b512778af (patch) | |
| tree | ab215760e2e77124bbb8970b0913c2a99ae68743 /django/db/models/fields/files.py | |
| parent | 61dae11df52fae71fc3050974ac459f362c9dfd7 (diff) | |
Fixed #36005 -- Dropped support for Python 3.10 and 3.11.
Diffstat (limited to 'django/db/models/fields/files.py')
| -rw-r--r-- | django/db/models/fields/files.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py index 0716d3599e..03c3939a4e 100644 --- a/django/db/models/fields/files.py +++ b/django/db/models/fields/files.py @@ -14,7 +14,6 @@ from django.db.models.fields import Field from django.db.models.query_utils import DeferredAttribute from django.db.models.utils import AltersData from django.utils.translation import gettext_lazy as _ -from django.utils.version import PY311 class FieldFile(File, AltersData): @@ -329,7 +328,7 @@ class FileField(Field): f"File for {self.name} must have " "the name attribute specified to be saved." ) - if PY311 and isinstance(file._file, ContentFile): + if isinstance(file._file, ContentFile): exc.add_note("Pass a 'name' argument to ContentFile.") raise exc |
