Handle None in to_bool utility
None is commonly used, so we want to be able to handle it with this helper. Found with a test case.
This commit is contained in:
		@ -29,6 +29,8 @@ class Utils:
 | 
			
		||||
    def to_bool(cls, val):
 | 
			
		||||
        """make sensible boolean from string or other type value"""
 | 
			
		||||
 | 
			
		||||
        if val is None:
 | 
			
		||||
            return False
 | 
			
		||||
        if isinstance(val, bool):
 | 
			
		||||
            return val
 | 
			
		||||
        elif isinstance(val, int):
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user