Fix empty retention count display on remotes list page

Fall back to default '30' when RETENTION_COUNT is set to empty string,
not just when the key is missing from the config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shuki
2026-03-04 19:26:29 +02:00
parent afff4ef091
commit 5b19d5d29e

View File

@@ -148,7 +148,8 @@ sub handle_list {
my $conf = GnizaWHM::Config::parse(GnizaWHM::UI::remote_conf_path($name), 'remote');
my $esc_name = GnizaWHM::UI::esc($name);
my $type = $conf->{REMOTE_TYPE} // 'ssh';
my $retention = GnizaWHM::UI::esc($conf->{RETENTION_COUNT} // '30');
my $retention_raw = $conf->{RETENTION_COUNT} // '';
my $retention = GnizaWHM::UI::esc($retention_raw ne '' ? $retention_raw : '30');
my ($type_label, $dest);
if ($type eq 's3') {