Skip to content

Commit

Permalink
fix item updates with api response [SDNTB-875] (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
devketanpro authored Nov 5, 2024
1 parent a80d5d6 commit 270d77b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/ntb/macros/nob_NO_translate_macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def nob_NO_translate_macro(item, **kwargs):
r = requests.post("https://nynorsk.cloud/translate", json=data, timeout=(10, 30))

if r.status_code == 200:
item.update(r.json())
response = r.json()
item.update(response["document"])
return item


Expand Down

0 comments on commit 270d77b

Please sign in to comment.