File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,13 @@ def dispatch_msg(msg):
5555 return dispatch_msg ("[%s] Key is set when it should be unset: %s." % (func .__name__ , key ))
5656 else :
5757 dict_val = validate_dict [key ]
58- if not_empty and dict_val :
58+ if not_empty and not dict_val :
5959 return dispatch_msg ("[%s] Key is not empty: %s." % (func .__name__ , key ))
6060 elif isinstance (key , dict ):
6161 if dict_val := walk_dict (validate_dict , key , fail_safe = not raise_exception ):
6262 if unset :
6363 return dispatch_msg ("[%s] Key is set when it should be unset: %s." % (func .__name__ , dict_val ))
64- if not_empty and dict_val :
64+ if not_empty and not dict_val :
6565 return dispatch_msg ("[%s] Key is not empty: %s." % (func .__name__ , dict_val ))
6666 elif not unset :
6767 raise ValueError ("Unable to find key: %s." % key )
You can’t perform that action at this time.
0 commit comments