Commit b874d52b authored by Georgios Tsakalos's avatar Georgios Tsakalos
Browse files

fix bugs in software service

parent 79cc765b
......@@ -55,12 +55,16 @@ class SoftwareService implements SoftwareServiceInterface
if (!$software->id) {
throw new \InvalidArgumentException('No software found');
$this->persistSoftware($software, $id);
$this->persistSoftware($software, $data);
return $software->export();
private function persistSoftware($software, array $data)
if (!$data['lab_id']){
$data['lab_id'] = NULL;
$software->softwarecategory_id = $data['softwarecategory'];
$software->school_id = $data['school_id'];
$software->lab_id = $data['lab_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