fix(server): correctly identify integers

This commit is contained in:
Jason Rasmussen
2025-09-10 22:27:55 -04:00
parent 2d2673c114
commit b0291b6ad6
27 changed files with 152 additions and 135 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ class DatabaseBackupConfig {
bool enabled;
/// Minimum value: 1
num keepLastAmount;
int keepLastAmount;
@override
bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupConfig &&
@@ -60,7 +60,7 @@ class DatabaseBackupConfig {
return DatabaseBackupConfig(
cronExpression: mapValueOfType<String>(json, r'cronExpression')!,
enabled: mapValueOfType<bool>(json, r'enabled')!,
keepLastAmount: num.parse('${json[r'keepLastAmount']}'),
keepLastAmount: mapValueOfType<int>(json, r'keepLastAmount')!,
);
}
return null;