[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
This commit is contained in:
Jeremy Price 2023-01-23 15:08:59 -08:00
parent 4b01909806
commit d3bcc48ae5

View file

@ -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 {