]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Use same style for Range creation
authorYurii Karabas <1998uriyyo@gmail.com>
Mon, 20 Mar 2023 12:22:20 +0000 (14:22 +0200)
committerYurii Karabas <1998uriyyo@gmail.com>
Mon, 20 Mar 2023 12:22:38 +0000 (14:22 +0200)
lib/sqlalchemy/dialects/postgresql/ranges.py

index bc83367fec3718012705a48f496df071d2b00c4d..cefd280ea4df9c36d717f491c3fc3833843d4d2c 100644 (file)
@@ -644,7 +644,7 @@ class Range(Generic[_T]):
     def intersection(self, other: Range[_T]) -> Range[_T]:
         """Compute the intersection of this range with the `other`."""
         if self.empty or other.empty or not self.overlaps(other):
-            return Range(empty=True)
+            return Range(None, None, empty=True)
 
         slower = self.lower
         slower_b = self.bounds[0]