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