Fix RegularSession serialization
This commit is contained in:
parent
ca5a8312e4
commit
60294ed18b
@ -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"
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user