Skip to content

Commit

Permalink
fix: #241 handle newer bibtex response changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdhorn committed Apr 25, 2024
1 parent 18c5626 commit d827abd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/view/zotero/zotero_bibtex.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def get_pick_data(self, minimize=True, detail=True):
pick = self._get(endpoint)
if pick:
citation = json.loads(pick)[0]
if detail and "citekey" in citation:
source = self.get_source_data(citation["citekey"])
notes = self.get_note_data(citation["citekey"])
if detail and "citationKey" in citation:
source = self.get_source_data(citation["citationKey"])
notes = self.get_note_data(citation["citationKey"])
else:
source = None
notes = None
Expand All @@ -121,7 +121,7 @@ def get_source_data(self, citekey):
return None
try:
data = json.loads(export)
source = json.loads(data["result"][2])[0]
source = json.loads(data["result"])[0]
except json.JSONDecodeError:
return None
return source
Expand Down

0 comments on commit d827abd

Please sign in to comment.