Skip to content

Commit

Permalink
changing conditions in ScalarRange for is_datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Deathn0t committed Jul 26, 2024
1 parent 9c5d3c9 commit c95fb5a
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit c95fb5a

Please sign in to comment.