Skip to content

Commit

Permalink
Don't write out empty string into limit_regulation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlul committed Nov 12, 2024
1 parent 8ebc149 commit cc9dbb7
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/job_ocgtcg.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,11 @@ def annotate_limit_regulation(
if (
(release := unreleased.get(document["name"]["en"]))
# Exclude The Seal of Orichalcos (UDE promo) and some others
and release.get("OCG status") != "Illegal"
and release.get("TCG status") != "Illegal"
and (ocg := release.get("OCG status")) != "Illegal"
and (tcg := release.get("TCG status")) != "Illegal"
):
document["limit_regulation"]["tcg"] = release.get(
"TCG status", "Not yet released"
)
document["limit_regulation"]["ocg"] = release.get(
"OCG status", "Not yet released"
)
document["limit_regulation"]["tcg"] = tcg or "Not yet released"
document["limit_regulation"]["ocg"] = ocg or "Not yet released"
if speed := release.get("TCG Speed Duel status"):
document["limit_regulation"]["speed"] = speed
if (
Expand Down

0 comments on commit cc9dbb7

Please sign in to comment.