From 0fd0192b37a018f5eecc13f5add222b19c03ce6a Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Tue, 30 Jan 2024 13:53:44 +0100 Subject: [PATCH] chore: Replace deprecated smart_text with smart_str Part-of: --- api/funkwhale_api/common/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/funkwhale_api/common/serializers.py b/api/funkwhale_api/common/serializers.py index 3a6e52630..03817424e 100644 --- a/api/funkwhale_api/common/serializers.py +++ b/api/funkwhale_api/common/serializers.py @@ -5,7 +5,7 @@ import os import PIL from django.core.exceptions import ObjectDoesNotExist from django.core.files.uploadedfile import SimpleUploadedFile -from django.utils.encoding import smart_text +from django.utils.encoding import smart_str from django.utils.translation import gettext_lazy as _ from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import extend_schema_field @@ -52,7 +52,7 @@ class RelatedField(serializers.RelatedField): self.fail( "does_not_exist", related_field_name=self.related_field_name, - value=smart_text(data), + value=smart_str(data), ) except (TypeError, ValueError): self.fail("invalid")