mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-11-04 18:08:01 +03:00 
			
		
		
		
	Bugfix: FormMutation was always causing boolean fields to be required
This commit is contained in:
		
							parent
							
								
									ea2cd9894f
								
							
						
					
					
						commit
						29b8ea8398
					
				| 
						 | 
					@ -43,7 +43,7 @@ def convert_form_field_to_int(field):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@convert_form_field.register(forms.BooleanField)
 | 
					@convert_form_field.register(forms.BooleanField)
 | 
				
			||||||
def convert_form_field_to_boolean(field):
 | 
					def convert_form_field_to_boolean(field):
 | 
				
			||||||
    return Boolean(description=field.help_text, required=True)
 | 
					    return Boolean(description=field.help_text, required=field.required)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@convert_form_field.register(forms.NullBooleanField)
 | 
					@convert_form_field.register(forms.NullBooleanField)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user