Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #90 from atrocore/i-633eb763952af3224
Browse files Browse the repository at this point in the history
check from get name when assetType is new
  • Loading branch information
rratsun authored Oct 18, 2022
2 parents 1b58285 + fefaa4e commit dbbaed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Repositories/AssetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function isInUse(Entity $entity): bool
->getEntityManager()
->getRepository('Asset')
->select(['id'])
->where(['type*' => '%"' . $entity->getFetched('name') . '"%'])
->where(['type*' => '%"' . ($entity->isNew() ? $entity->get('name') : $entity->getFetched('name')) . '"%'])
->findOne();

return !empty($asset);
Expand Down

0 comments on commit dbbaed4

Please sign in to comment.