From: Christian Heller Date: Tue, 25 Mar 2025 11:40:05 +0000 (+0100) Subject: Fix broken Booking movement. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/test.html?a=commitdiff_plain;h=9a10db9bf355c988385f6b37fb56f5c1f0991949;p=ledgplom Fix broken Booking movement. --- diff --git a/src/ledgplom/ledger.py b/src/ledgplom/ledger.py index 450c6d8..40081d0 100644 --- a/src/ledgplom/ledger.py +++ b/src/ledgplom/ledger.py @@ -540,8 +540,8 @@ class Ledger: def move_booking(self, idx_from: int, up: bool) -> int: """Move _Booking of old_id one step up or downwards""" new_id = idx_from + (-1 if up else 1) - idx_to = new_id + (0 if up else 1) # down-move imlies jump over next - self._move_booking(new_id, idx_to) + idx_to = new_id + (0 if up else 1) # down-move implies jump over next + self._move_booking(idx_from, idx_to) self._sync() return new_id