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

export software bean with categories

fix bug in software creation
parent 8240a31e
...@@ -65,7 +65,7 @@ class SoftwareService implements SoftwareServiceInterface ...@@ -65,7 +65,7 @@ class SoftwareService implements SoftwareServiceInterface
$data['lab_id'] = NULL; $data['lab_id'] = NULL;
} }
$software->softwarecategory_id = $data['softwarecategory']; $software->softwarecategory_id = $data['softwarecategory_id'];
$software->school_id = $data['school_id']; $software->school_id = $data['school_id'];
$software->lab_id = $data['lab_id']; $software->lab_id = $data['lab_id'];
$software->title = $data['title']; $software->title = $data['title'];
...@@ -103,7 +103,10 @@ class SoftwareService implements SoftwareServiceInterface ...@@ -103,7 +103,10 @@ class SoftwareService implements SoftwareServiceInterface
$exported = []; $exported = [];
foreach($beans as $bean) foreach($beans as $bean)
{ {
$exported[] = $bean->export(); $cat = $this->getSoftwareCategoryById($bean->id);
$exported_bean = $bean->export();
$exported_bean['softwarecategory'] = $cat['name'];
$exported[] = $exported_bean;
} }
return $exported; return $exported;
} }
......
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