Skip to content

Commit

Permalink
fix: subject without readings
Browse files Browse the repository at this point in the history
  • Loading branch information
ajite committed Oct 17, 2023
1 parent 8b15af4 commit e1bd827
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi:
needs: Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
concurrency: release
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
11 changes: 10 additions & 1 deletion hebikani/hebikani.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,16 @@ def readings(self):
self._readings = AnswerManager(
[
Answer(answer, QuestionType.READING)
for answer in self.data["data"]["readings"]
for answer in self.data["data"].get(
"readings",
[
{
"primary": True,
"reading": self.data["data"]["characters"],
"accepted_answer": True,
}
],
)
]
)
return self._readings
Expand Down

0 comments on commit e1bd827

Please sign in to comment.