Fix RegularSession serialization

This commit is contained in:
Leonard Steppy 2025-02-18 17:18:50 +01:00
parent ca5a8312e4
commit 60294ed18b
2 changed files with 2 additions and 3 deletions

View File

@ -6,4 +6,4 @@ edition = "2021"
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
clap = { version = "4.5", features = ["derive"] }
serde_json_any_key = "2.0"

View File

@ -75,11 +75,10 @@ impl_from!(ExtraSession for Session as Extra);
pub struct RegularSession {
pub rule: SessionRule,
pub note: Note,
#[serde(with = "serde_json_any_key::any_key_map")]
pub except: BTreeMap<Day, Except>,
}
//TODO we need to implement serialize ourselves, since json doesn't support anything other than string keys
impl From<SessionRule> for RegularSession {
fn from(rule: SessionRule) -> Self {
Self {