home · contact · privacy
Fix wrongly placed assert. master
authorChristian Heller <c.heller@plomlompom.de>
Thu, 3 Apr 2025 02:28:30 +0000 (04:28 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 3 Apr 2025 02:28:30 +0000 (04:28 +0200)
src/ledgplom/ledger.py

index dda0dec446d2e0180bfc4882619b20fac89cc07a..552987bc5e4033490ea9ae5bada7e6fee93e95d3 100644 (file)
@@ -489,7 +489,6 @@ class _Booking(_LinesBlock):
     def move(self, up: bool) -> None:
         """Move self and following gap up or down in line blocks chain."""
         old_next = self.next
-        assert old_next is not None
         assert self.next_block is not None
         if up:
             old_prev = self.prev
@@ -500,6 +499,7 @@ class _Booking(_LinesBlock):
             self.next_block.next_block = old_prev
             old_prev.next_block.next_block = old_next
         else:
+            assert old_next is not None
             old_prev_block = self.prev_block
             self.next_block.next_block = old_next.next
             self.prev_block = old_next.next_block