diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7235ad..d5bac2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/hebikani/hebikani.py b/hebikani/hebikani.py index 81c31b6..3fefd2d 100755 --- a/hebikani/hebikani.py +++ b/hebikani/hebikani.py @@ -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