mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleaning stuff.
This commit is contained in:
@@ -33,8 +33,8 @@ use FireflyIII\Models\Note;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class AttachmentRepository.
|
||||
@@ -231,7 +231,11 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
||||
if ('' === $note) {
|
||||
$dbNote = $attachment->notes()->first();
|
||||
if (null !== $dbNote) {
|
||||
$dbNote->delete();
|
||||
try {
|
||||
$dbNote->delete();
|
||||
} catch (Exception $e) {
|
||||
Log::debug(sprintf('Could not delete note: %s', $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user