verify: allow '0' days for reverification

and let it mean that we will always reverify

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-01-27 15:13:19 +01:00 committed by Thomas Lamprecht
parent 7a524f1048
commit 7a1a5d206d
2 changed files with 3 additions and 3 deletions

View File

@ -145,8 +145,8 @@ pub const IGNORE_VERIFIED_BACKUPS_SCHEMA: Schema = BooleanSchema::new(
.schema(); .schema();
pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = IntegerSchema::new( pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = IntegerSchema::new(
"Days after that a verification becomes outdated") "Days after that a verification becomes outdated. (0 means always)")
.minimum(1) .minimum(0)
.schema(); .schema();
#[api( #[api(

View File

@ -560,7 +560,7 @@ pub fn verify_filter(
let now = proxmox_time::epoch_i64(); let now = proxmox_time::epoch_i64();
let days_since_last_verify = (now - last_verify.upid.starttime) / 86400; let days_since_last_verify = (now - last_verify.upid.starttime) / 86400;
days_since_last_verify > max_age max_age == 0 || days_since_last_verify > max_age
} }
} }
} }