Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing conditions in ScalarRange for is_datetime #2150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdv/constraints/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down