From 811afd03332abb2b13c166d7e2317c506a1cac4c Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sat, 1 Jul 2023 12:52:52 -0700 Subject: [PATCH] Handle challenges with no Japanese content like #59 --- src/models/challenge.rs | 2 +- templates/index.html.tera | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models/challenge.rs b/src/models/challenge.rs index 573e3e7..b5756dd 100644 --- a/src/models/challenge.rs +++ b/src/models/challenge.rs @@ -8,7 +8,7 @@ use crate::{prelude::*}; #[derive(Serialize, Deserialize)] pub struct Challenge { - pub japanese: Vec>>, + pub japanese: Option>>>, pub english: Option>, pub song: Option, pub youtube: Option, diff --git a/templates/index.html.tera b/templates/index.html.tera index e620d99..2730895 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -67,6 +67,7 @@

Welcome to Tegaki Tuesday #{{ challenge }}!

+ {% if content.japanese %}