From 00ac51c83d1de37ec8fa13d3a61a3ac21bf98e6b Mon Sep 17 00:00:00 2001 From: andrei-datcu Date: Wed, 11 Aug 2021 21:43:53 +0300 Subject: [PATCH] Cast translated description for DecimalField https://github.com/graphql-python/graphene-django/pull/976 casts all the description fields to strings to prevent schema printing from failing whenever the description is a lazy translated string. The `DecimalField` however got in after the v3 merge and it currently misses the cast. --- graphene_django/converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/converter.py b/graphene_django/converter.py index c243e82..eabb680 100644 --- a/graphene_django/converter.py +++ b/graphene_django/converter.py @@ -205,7 +205,7 @@ def convert_field_to_boolean(field, registry=None): @convert_django_field.register(models.DecimalField) def convert_field_to_decimal(field, registry=None): - return Decimal(description=field.help_text, required=not field.null) + return Decimal(description=get_django_field_description(field), required=not field.null) @convert_django_field.register(models.FloatField)