diff --git a/schemas/fields/hive_int.py b/schemas/fields/hive_int.py index 29e9624fb4cefddb5df9da845fab7a6ef6e015b5..addc84bc3659b8064b4371c26310be86daed453d 100644 --- a/schemas/fields/hive_int.py +++ b/schemas/fields/hive_int.py @@ -26,7 +26,7 @@ class HiveIntFactory(InitValidator[int], int): @classmethod def validate(cls, value: Any) -> int: error_template = msgspec.ValidationError("The value could only be int or string that can be converted to int!") - if not isinstance(value, (HiveIntFactory, str)) and type(value) is not int: + if not isinstance(value, (HiveIntFactory, str)) and (not isinstance(value, int) or isinstance(value, bool)): raise error_template try: return super().validate(int(value))