Skip to content

Commit

Permalink
Replace deprecated smart_text
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Feb 14, 2024
1 parent e0b9470 commit 3b1ccb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/objects/api/fields.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.exceptions import ObjectDoesNotExist
from django.utils.encoding import smart_text
from django.utils.encoding import smart_str
from django.utils.translation import gettext_lazy as _

from rest_framework import serializers
Expand Down Expand Up @@ -42,7 +42,7 @@ def to_internal_value(self, data):
try:
return self.get_queryset().get_by_url(data)
except ObjectDoesNotExist:
self.fail("does_not_exist", value=smart_text(data))
self.fail("does_not_exist", value=smart_str(data))
except (TypeError, ValueError):
self.fail("invalid")

Expand Down

0 comments on commit 3b1ccb1

Please sign in to comment.