mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
9deedb80ea
Saving an expense twice while its receipt is also attached to a place and a booking hit the new unique index on (file, expense): the row kept from the first save was skipped, the next spare link row was adopted into a duplicate pair, and the constraint threw inside the transaction. The whole edit rolled back with a 500, every time, so that expense could never be changed again. The adopt now skips a link the expense already holds, and a receipt named twice in one save is linked once. The offline place cache was keyed on the place id alone while it is owned and evicted per trip, so two trips over the same city took each other's rows: the second write claimed them, switching the second trip off deleted them for both, and the first trip's fingerprint still matched so nothing ever refilled them. Offline search then answered nothing for a trip whose switch read "on". Each trip keeps its own copies now, and the upgrade clears the fingerprints so the next sync refills what the rebuild dropped. The chat composer minted its object URLs inside a state updater, which React runs twice in development, so one picked image drew two thumbnails and removing one left a preview for a picture that would not be sent. File and URL are one record now and every mutator commits a finished list. import_google_maps_route wrote up to thirty places and their day assignments under trips:write, which does not imply the places:write that create_place is gated on, and it was the one non-admin write tool with no demo gate and the only tool in the repo with no annotations. All three corrected.