diff options
| author | saJaeHyukc <wogur981208@gmail.com> | 2025-03-10 22:55:05 +0900 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-03-10 20:11:01 +0100 |
| commit | c1257350ca118868bdfc867926dffad38b215162 (patch) | |
| tree | 57710fa895c7e03dc92ca634ef94134eccc8ff0d /tests/postgres_tests | |
| parent | e44e8327d3d88d86895735c0e427102063ff5b55 (diff) | |
Fixed #36222 -- Fixed ExclusionConstraint validation crash on excluded fields in condition.
Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_constraints.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_constraints.py b/tests/postgres_tests/test_constraints.py index 96b5d39092..f107bffcfe 100644 --- a/tests/postgres_tests/test_constraints.py +++ b/tests/postgres_tests/test_constraints.py @@ -797,6 +797,17 @@ class ExclusionConstraintTests(PostgreSQLTestCase): ), exclude={"datespan", "start", "end", "room"}, ) + # Constraints with excluded fields in condition are ignored. + constraint.validate( + HotelReservation, + HotelReservation( + datespan=(datetimes[1].date(), datetimes[2].date()), + start=datetimes[1], + end=datetimes[2], + room=room102, + ), + exclude={"cancelled"}, + ) def test_range_overlaps_custom(self): class TsTzRange(Func): |
