This commit is contained in:
James Cole 2023-06-11 16:15:22 +02:00
parent 208ae1cae7
commit 6b580212bf
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -229,7 +229,7 @@ class AttachmentHelper implements AttachmentHelperInterface
if ($model instanceof PiggyBank) {
$count = $model->account->user->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count();
}
if ($model instanceof PiggyBank) {
if (!($model instanceof PiggyBank)) {
$count = $model->user->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count(
); // @phpstan-ignore-line
}