fix: Remove the _delegate_text attribute, which is being removed in django 5.0 (#9278)

This commit is contained in:
JAEGYUN JUNG 2024-03-08 22:14:27 +09:00 committed by GitHub
parent a2eabfc867
commit 730d216794
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,8 +27,8 @@ def smart_repr(value):
if isinstance(value, models.Manager): if isinstance(value, models.Manager):
return manager_repr(value) return manager_repr(value)
if isinstance(value, Promise) and value._delegate_text: if isinstance(value, Promise):
value = force_str(value) value = force_str(value, strings_only=True)
value = repr(value) value = repr(value)