diff --git a/fava_client.py b/fava_client.py index 5c66593..dd83699 100644 --- a/fava_client.py +++ b/fava_client.py @@ -951,18 +951,17 @@ class FavaClient: async def get_entry_context(self, entry_hash: str) -> Dict[str, Any]: """ - Get entry context including source text and sha256sum. + Get entry source text and sha256sum for editing. + + Uses /source_slice endpoint which returns the editable source. Args: entry_hash: Entry hash from get_journal_entries() Returns: { - "entry": {...}, # Serialized entry "slice": "2025-01-15 ! \"Description\"...", # Beancount source text "sha256sum": "abc123...", # For concurrency control - "balances_before": {...}, - "balances_after": {...} } Example: @@ -973,7 +972,7 @@ class FavaClient: try: async with httpx.AsyncClient(timeout=self.timeout) as client: response = await client.get( - f"{self.base_url}/context", + f"{self.base_url}/source_slice", params={"entry_hash": entry_hash} ) response.raise_for_status()