more code fixes

This commit is contained in:
Dennis Eichhorn 2024-03-15 21:57:48 +00:00
parent a6aa448ed0
commit 2181bb1e93
3 changed files with 4 additions and 2 deletions

View File

@ -71,7 +71,7 @@ final class ApiAttributeController extends Controller
->with('type')
->where('type/id', $type->id)
->where('ref', (int) $request->getData('ref'))
->execute();
->executeCount();
if ($attr > 0) {
$response->header->status = RequestStatusCode::R_409;

View File

@ -209,7 +209,7 @@ final class ApiController extends Controller
$items = [];
/** @var Item $item */
foreach (ItemMapper::yield()->execute() as $item) {
foreach (ItemMapper::yield()->executeYield() as $item) {
$items[] = [
'id' => $item->id,
'name1' => $item->getL11n('name1')->content,

View File

@ -517,6 +517,7 @@ final class BackendController extends Controller
->execute()
: [];
/** @var \Modules\Attribute\Models\AttributeType[] $tmp */
$tmp = ItemAttributeTypeMapper::getAll()
->with('defaults')
->with('defaults/l11n')
@ -537,6 +538,7 @@ final class BackendController extends Controller
$view->data['defaultAttributeTypes'] = $defaultAttributeTypes;
/** @var \Modules\Attribute\Models\AttributeType[] $tmp */
$tmp = ClientAttributeTypeMapper::getAll()
->with('defaults')
->with('defaults/l11n')