From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 6 Feb 2025 21:17:23 +0000 (+0100)
Subject: On Booking copy, jump into edit_structured view of new Booking.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/condition_titles?a=commitdiff_plain;h=e46a40afb5f99d3495d5f358e5e459b871a542ba;p=ledgplom

On Booking copy, jump into edit_structured view of new Booking.
---

diff --git a/ledger.py b/ledger.py
index 1b3aa27..f8f92c0 100755
--- a/ledger.py
+++ b/ledger.py
@@ -426,9 +426,10 @@ class Handler(PlomHttpHandler):
         id_ = int(id_str)
         if action == 'move':
             id_ = self.server.move_booking(id_, dir_ == 'up')
+            return Path(self.path).joinpath(f'#{id_}')
         elif action == 'copy':
             id_ = self.server.copy_booking(id_, dir_ == 'to_end')
-        return Path(self.path).joinpath(f'#{id_}')
+            return Path(EDIT_STRUCT).joinpath(f'{id_}')
 
     def do_GET(self) -> None:
         """"Route GET requests to respective handlers."""