mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-16 08:17:27 -08:00
Fix: Removed setting validation as it is not strictly necessary
This commit is contained in:
parent
5639a84d90
commit
d5c141dc59
|
@ -1245,17 +1245,11 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$settings = Setting::getSettings();
|
$settings = Setting::getSettings();
|
||||||
|
|
||||||
if (!$settings) {
|
|
||||||
throw new \Exception('Settings could not be loaded');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if logo file exists in storage and disable logo if not found
|
// Check if logo file exists in storage and disable logo if not found
|
||||||
// This prevents errors when trying to include a non-existent logo in the PDF
|
// This prevents errors when trying to include a non-existent logo in the PDF
|
||||||
$original_logo = $settings->label_logo;
|
$settings->label_logo = ($original_logo = $settings->label_logo) && !Storage::disk('public')->exists('/' . $original_logo) ? null : $settings->label_logo;
|
||||||
if ($original_logo && !Storage::disk('public')->exists('/' . $original_logo)) {
|
|
||||||
$settings->label_logo = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$label = new Label();
|
$label = new Label();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue