openzim / cms

ZIM file Publishing Platform
https://cms.openzim.org
GNU General Public License v3.0
4 stars 0 forks source link

Fix language query to fetch only based on codename #98

Closed benoit74 closed 10 months ago

benoit74 commented 10 months ago

Rationale

Probably due to an upstream change (in Babel ?), languages name and native properties are not up-to-date anymore in the DB. Code was not properly handling this situation, probably assuming these properties will never change.

Changes

codecov[bot] commented 10 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (942be8e) 100.00% compared to head (ea51155) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #98 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 19 19 Lines 608 616 +8 ========================================= + Hits 608 616 +8 ``` | [Files](https://app.codecov.io/gh/openzim/cms/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim) | Coverage Δ | | |---|---|---| | [...end/src/backend/exporters/kiwix\_public\_exporter.py](https://app.codecov.io/gh/openzim/cms/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-YmFja2VuZC9zcmMvYmFja2VuZC9leHBvcnRlcnMva2l3aXhfcHVibGljX2V4cG9ydGVyLnB5) | `100.00% <ø> (ø)` | | | [backend/src/backend/formatters/\_\_init\_\_.py](https://app.codecov.io/gh/openzim/cms/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-YmFja2VuZC9zcmMvYmFja2VuZC9mb3JtYXR0ZXJzL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [backend/src/backend/formatters/kiwixlibraryxml.py](https://app.codecov.io/gh/openzim/cms/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-YmFja2VuZC9zcmMvYmFja2VuZC9mb3JtYXR0ZXJzL2tpd2l4bGlicmFyeXhtbC5weQ==) | `100.00% <ø> (ø)` | | | [backend/src/backend/models.py](https://app.codecov.io/gh/openzim/cms/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-YmFja2VuZC9zcmMvYmFja2VuZC9tb2RlbHMucHk=) | `100.00% <100.00%> (ø)` | | | [backend/src/backend/routes/books.py](https://app.codecov.io/gh/openzim/cms/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-YmFja2VuZC9zcmMvYmFja2VuZC9yb3V0ZXMvYm9va3MucHk=) | `100.00% <100.00%> (ø)` | | | [backend/src/backend/schemas.py](https://app.codecov.io/gh/openzim/cms/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-YmFja2VuZC9zcmMvYmFja2VuZC9zY2hlbWFzLnB5) | `100.00% <ø> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

benoit74 commented 10 months ago

Regarding formatting, looks like black has changed some convention ^^

rgaudin commented 10 months ago

Regarding formatting, looks like black has changed some convention ^^

But the workflow checks for black on a pinned version…

benoit74 commented 10 months ago

My fault, looks like I did not used the local version but my system one ...

rgaudin commented 10 months ago

Passed the QA check anyway 👍