From f2b62e93cecc1f935e8589196c78ee0c975210d2 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 7 Jan 2025 09:29:38 +0100 Subject: [PATCH] fix: readonly does not exists fix: validate after setting timezone to the new value --- app/Livewire/Project/Database/BackupEdit.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Livewire/Project/Database/BackupEdit.php b/app/Livewire/Project/Database/BackupEdit.php index bf5302cb9..0dea0496c 100644 --- a/app/Livewire/Project/Database/BackupEdit.php +++ b/app/Livewire/Project/Database/BackupEdit.php @@ -40,7 +40,7 @@ class BackupEdit extends Component #[Validate(['required', 'string'])] public string $frequency = ''; - #[Validate(['readonly', 'string'])] + #[Validate(['string'])] public string $timezone = ''; #[Validate(['required', 'integer', 'min:1'])] @@ -71,7 +71,6 @@ class BackupEdit extends Component public function syncData(bool $toModel = false) { if ($toModel) { - $this->customValidate(); $this->backup->enabled = $this->backupEnabled; $this->backup->frequency = $this->frequency; $this->backup->number_of_backups_locally = $this->numberOfBackupsLocally; @@ -79,6 +78,7 @@ class BackupEdit extends Component $this->backup->s3_storage_id = $this->s3StorageId; $this->backup->databases_to_backup = $this->databasesToBackup; $this->backup->dump_all = $this->dumpAll; + $this->customValidate(); $this->backup->save(); } else { $this->backupEnabled = $this->backup->enabled; @@ -187,12 +187,12 @@ class BackupEdit extends Component private function deleteAssociatedBackupsS3() { - //Add function to delete backups from S3 + // Add function to delete backups from S3 } private function deleteAssociatedBackupsSftp() { - //Add function to delete backups from SFTP + // Add function to delete backups from SFTP } private function deleteEmptyBackupFolder($folderPath, $server)