From c95fb5accafe4590763966ba52473bc9d7c83d9c Mon Sep 17 00:00:00 2001 From: Deathn0t Date: Fri, 26 Jul 2024 10:14:02 +0200 Subject: [PATCH] changing conditions in ScalarRange for is_datetime --- sdv/constraints/tabular.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdv/constraints/tabular.py b/sdv/constraints/tabular.py index 63fdcaa9a..c6ef7045e 100644 --- a/sdv/constraints/tabular.py +++ b/sdv/constraints/tabular.py @@ -1136,7 +1136,7 @@ def _get_is_datetime(self): is_high_datetime = _is_datetime_type(self._high_value) is_datetime = is_low_datetime and is_high_datetime and is_column_datetime - if not is_datetime and any([is_low_datetime, is_column_datetime, is_high_datetime]): + if is_column_datetime and not(all([is_low_datetime, is_column_datetime, is_high_datetime])): raise ValueError('The constraint column and bounds must all be datetime.') return is_datetime