Skip to content

Commit

Permalink
fix: Remove the _delegate_text attribute, which is being removed in…
Browse files Browse the repository at this point in the history
… django 5.0 (#9278)
  • Loading branch information
TGoddessana authored Mar 8, 2024
1 parent a2eabfc commit 730d216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest_framework/utils/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def smart_repr(value):
if isinstance(value, models.Manager):
return manager_repr(value)

if isinstance(value, Promise) and value._delegate_text:
value = force_str(value)
if isinstance(value, Promise):
value = force_str(value, strings_only=True)

value = repr(value)

Expand Down

0 comments on commit 730d216

Please sign in to comment.