Fix entry_id mismatch between castle links and exp/rcv links
Pass entry_id from views_api.py to format_expense_entry and
format_receivable_entry so that all links use the same ID:
- ^castle-{entry_id}
- ^exp-{entry_id} / ^rcv-{entry_id}
- entry-id metadata
Previously, views_api.py generated an entry_id for castle-* links
but didn't pass it to the format functions, which generated their
own separate IDs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
69ce1d9601
commit
da74e668c8
1 changed files with 4 additions and 2 deletions
|
|
@ -1125,7 +1125,8 @@ async def api_create_expense_entry(
|
|||
is_equity=data.is_equity,
|
||||
fiat_currency=fiat_currency,
|
||||
fiat_amount=fiat_amount,
|
||||
reference=castle_reference # Add castle ID as link
|
||||
reference=castle_reference,
|
||||
entry_id=entry_id # Pass entry_id so all links match
|
||||
)
|
||||
|
||||
# Submit to Fava
|
||||
|
|
@ -1252,7 +1253,8 @@ async def api_create_receivable_entry(
|
|||
entry_date=datetime.now().date(),
|
||||
fiat_currency=fiat_currency,
|
||||
fiat_amount=fiat_amount,
|
||||
reference=castle_reference # Use castle reference with unique ID
|
||||
reference=castle_reference,
|
||||
entry_id=entry_id # Pass entry_id so all links match
|
||||
)
|
||||
|
||||
# Submit to Fava
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue