Skip to content

Commit

Permalink
fix(models): return empty dict if bibtex is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Dec 16, 2024
1 parent 81547fd commit 6205894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis_bibsonomy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __str__(self):
def get_bibtex(self):
if isinstance(self.bibtex, str):
return json.loads(self.bibtex)
return self.bibtex
return self.bibtex or {}

def get_absolute_url(self):
return reverse("apis_bibsonomy:referencedetail", kwargs={"pk": self.pk})
Expand Down

0 comments on commit 6205894

Please sign in to comment.