mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(storage): resolve ${VAR:-default} bind sources and safe conversion (#12227)
This commit is contained in:
@@ -167,10 +167,12 @@ class FileStorage extends Component
|
||||
$this->fileStorage->content = null;
|
||||
$this->fileStorage->is_based_on_git = false;
|
||||
$changedFields = auditChangedFields($this->fileStorage);
|
||||
$this->fileStorage->save();
|
||||
$this->fileStorage->saveStorageOnServer();
|
||||
$this->fileStorage->save();
|
||||
$this->auditFileStorageUpdate($changedFields, 'converted_to_directory');
|
||||
} catch (\Throwable $e) {
|
||||
$this->fileStorage->refresh();
|
||||
|
||||
return handleError($e, $this);
|
||||
} finally {
|
||||
$this->dispatch('storageCountsChanged')->to(Storage::class);
|
||||
@@ -216,10 +218,12 @@ class FileStorage extends Component
|
||||
$this->fileStorage->is_based_on_git = true;
|
||||
}
|
||||
$changedFields = auditChangedFields($this->fileStorage);
|
||||
$this->fileStorage->save();
|
||||
$this->fileStorage->saveStorageOnServer();
|
||||
$this->fileStorage->save();
|
||||
$this->auditFileStorageUpdate($changedFields, 'converted_to_file');
|
||||
} catch (\Throwable $e) {
|
||||
$this->fileStorage->refresh();
|
||||
|
||||
return handleError($e, $this);
|
||||
} finally {
|
||||
$this->dispatch('storageCountsChanged')->to(Storage::class);
|
||||
|
||||
Reference in New Issue
Block a user