Skip to content

Commit

Permalink
Clearing timezone if schedule is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
githubsaturn committed May 6, 2024
1 parent 1ff86f4 commit 46d8f34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/user/system/DiskCleanupManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export default class DiskCleanupManager {

return Promise.resolve()
.then(() => {
configs.cronSchedule = (configs.cronSchedule || '').trim()
if (configs.mostRecentLimit < 0) {
throw ApiStatusCodes.createError(
ApiStatusCodes.ILLEGAL_PARAMETER,
Expand Down Expand Up @@ -186,6 +187,11 @@ export default class DiskCleanupManager {
}
})
.then(() => {
if (!configs.cronSchedule) {
configs.timezone = ''
configs.mostRecentLimit = 1
}

return self.dataStore.setDiskCleanupConfigs(configs)
})
.then(() => {
Expand Down

0 comments on commit 46d8f34

Please sign in to comment.