From d3bcc48ae51fa31e3477476501e992aea885c445 Mon Sep 17 00:00:00 2001 From: Jeremy Price Date: Mon, 23 Jan 2023 15:08:59 -0800 Subject: [PATCH] [imports] fix "Backup before importing?" checkbox on import page We were always taking backups before import, no matter the status of this box. Turns out we were testing for the presence of the property defined by the checkbox, rather than the value of the property, and as such were always doing a backup. We're now checking the status, and it behaves as expected --- app/Http/Controllers/Api/ImportController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ImportController.php b/app/Http/Controllers/Api/ImportController.php index e5f0c6ab1f..9742cc1644 100644 --- a/app/Http/Controllers/Api/ImportController.php +++ b/app/Http/Controllers/Api/ImportController.php @@ -127,7 +127,7 @@ class ImportController extends Controller $this->authorize('import'); // Run a backup immediately before processing - if ($request->has('run-backup')) { + if ($request->get('run-backup')) { \Log::debug('Backup manually requested via importer'); Artisan::call('backup:run'); } else {