bin/taud: check if due timestamp is not less than current timestamp

This commit is contained in:
ghassmo
2022-03-28 10:28:18 +04:00
committed by parazyd
parent bab301a970
commit fbbcb1842b

View File

@@ -81,6 +81,12 @@ impl TaskInfo {
let id: u32 = find_free_id(&task_ids);
if let Some(d) = &due {
if *d < get_current_time() {
return Err(TaudError::InvalidDueTime)
}
}
Ok(Self {
ref_id,
id,