[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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user