Code cleaning stuff.

This commit is contained in:
James Cole
2019-02-13 17:38:41 +01:00
parent 9a461fc7b7
commit 71fb9d8fa5
141 changed files with 495 additions and 482 deletions

View File

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