Skip to content

Commit 907269f

Browse files
committed
Minor bugfixes
1 parent e0b03da commit 907269f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def getExpenseTransactionBody(exp: Expense, myshare: ExpenseUser, data: list[str
359359
if getAccountCurrencyCode(source) != exp.getCurrencyCode():
360360
newTxn["foreign_currency_code"] = exp.getCurrencyCode()
361361
newTxn["foreign_amount"] = myshare.getOwedShare()
362-
newTxn["amount"] = 0
362+
newTxn["amount"] = 0.1
363363
newTxn["tags"] = [conf["FOREIGN_CURRENCY_TAG"]]
364364
print(
365365
f"Processing {category} {formatExpense(exp, myshare)} from {source} to {dest}")
@@ -373,7 +373,7 @@ def getAccountCurrencyCode(account_name: str) -> str:
373373
:return: The currency code
374374
:raises: ValueError if the account is not found
375375
"""
376-
ff_accounts = callApi("accounts/", method="GET", params={"type": "asset"}).json()
376+
ff_accounts = callApi("accounts/", method="GET", params={"type": "asset"}).json()['data']
377377
for acc in ff_accounts:
378378
if acc["attributes"]["name"] == account_name:
379379
return acc["attributes"]["currency_code"]

0 commit comments

Comments
 (0)