mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-11-04 09:57:53 +03:00 
			
		
		
		
	Cast translated description for DecimalField (#1255)
* 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. * Fix row size
This commit is contained in:
		
							parent
							
								
									4f315c365d
								
							
						
					
					
						commit
						56892d7f4b
					
				| 
						 | 
					@ -210,7 +210,9 @@ def convert_field_to_boolean(field, registry=None):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@convert_django_field.register(models.DecimalField)
 | 
					@convert_django_field.register(models.DecimalField)
 | 
				
			||||||
def convert_field_to_decimal(field, registry=None):
 | 
					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)
 | 
					@convert_django_field.register(models.FloatField)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user