Commit 9a0f84b5 authored by kanellov's avatar kanellov

fix assets lab_id

parent c71043c7
......@@ -49,7 +49,9 @@ class SchoolAsset
$labId = new Input('lab_id');
$labId->setRequired(true)
->getValidatorChain()
->getFilterChain()
->attach(new Filter\ToInt());
$labId->getValidatorChain()
->attach(new Validator\NotEmpty())
->attach(new Validator\Callback([
'callback' => function ($value) use ($labService) {
......@@ -95,7 +97,7 @@ class SchoolAsset
$this->inputFilter = new InputFilter();
$this->inputFilter
->add($id)
// ->add($labId)
->add($labId)
->add($itemCategoryId)
->add($qty)
->add($acquisitionYear)
......
......@@ -66,7 +66,7 @@ class LabService implements LabServiceInterface
throw new InvalidArgumentException('No lab found');
}
return $this->export($lab);
return $this->exportLab($lab);
}
public function getLabsBySchoolId($id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment