Skip to content

Commit

Permalink
fix: download report issue when error file is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Jul 23, 2024
1 parent ea41d88 commit d283780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ public function downloadErrorReport(int $id)
{
$import = $this->importRepository->findOrFail($id);

if (! $import->error_file_path) {
abort(404);
}

return Storage::disk('private')->download($import->error_file_path);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class="primary-button place-self-start"
class="primary-button place-self-start"
href="{{ route('admin.settings.data_transfer.imports.download_error_report', $import->id) }}"
target="_blank"
v-if="importResource.errors_count"
v-if="importResource.error_file_path && importResource.errors_count"
>
@lang('admin::app.settings.data-transfer.imports.import.download-error-report')
</a>
Expand Down

0 comments on commit d283780

Please sign in to comment.