Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zmsadmin/src/Zmsadmin/WorkstationSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function readResponse(
array $args
) {
/** @var \BO\Zmsentities\Workstation $workstation */
$workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 3])->getEntity();
$workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 2])->getEntity();
if (!$workstation->hasId()) {
return \BO\Slim\Render::redirect('index', array('error' => 'login_failed'));
}
Expand Down
26 changes: 13 additions & 13 deletions zmsadmin/tests/Zmsadmin/WorkstationSelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function testRendering()
[
'function' => 'readGetResult',
'url' => '/workstation/',
'parameters' => ['resolveReferences' => 3],
'response' => $this->readFixture("GET_workstation_with_process_resolved3.json")
'parameters' => ['resolveReferences' => 2],
'response' => $this->readFixture("GET_workstation_with_process_resolved2.json")
]
]
);
Expand All @@ -35,7 +35,7 @@ public function testLoginFailed()
[
'function' => 'readGetResult',
'url' => '/workstation/',
'parameters' => ['resolveReferences' => 3],
'parameters' => ['resolveReferences' => 2],
'response' => $this->readFixture("GET_Workstation_empty.json")
]
]
Expand All @@ -52,13 +52,13 @@ public function testRenderingSelect()
[
'function' => 'readGetResult',
'url' => '/workstation/',
'parameters' => ['resolveReferences' => 3],
'response' => $this->readFixture("GET_workstation_with_process_resolved3.json")
'parameters' => ['resolveReferences' => 2],
'response' => $this->readFixture("GET_workstation_with_process_resolved2.json")
],
[
'function' => 'readPostResult',
'url' => '/workstation/',
'response' => $this->readFixture("GET_workstation_with_process_resolved3.json")
'response' => $this->readFixture("GET_workstation_with_process_resolved2.json")
]
]
);
Expand All @@ -79,13 +79,13 @@ public function testRenderingSelectWithCustomRedirect()
[
'function' => 'readGetResult',
'url' => '/workstation/',
'parameters' => ['resolveReferences' => 3],
'response' => $this->readFixture("GET_workstation_with_process_resolved3.json")
'parameters' => ['resolveReferences' => 2],
'response' => $this->readFixture("GET_workstation_with_process_resolved2.json")
],
[
'function' => 'readPostResult',
'url' => '/workstation/',
'response' => $this->readFixture("GET_workstation_with_process_resolved3.json")
'response' => $this->readFixture("GET_workstation_with_process_resolved2.json")
]
]
);
Expand All @@ -107,7 +107,7 @@ public function testRenderingSelectFailedValidation()
[
'function' => 'readGetResult',
'url' => '/workstation/',
'parameters' => ['resolveReferences' => 3],
'parameters' => ['resolveReferences' => 2],
'response' => $this->readFixture("GET_Workstation_Resolved2.json")
]
]
Expand All @@ -130,13 +130,13 @@ public function testRenderingSelectAppointmentsOnlyWithCluster()
[
'function' => 'readGetResult',
'url' => '/workstation/',
'parameters' => ['resolveReferences' => 3],
'response' => $this->readFixture("GET_workstation_with_process_resolved3.json")
'parameters' => ['resolveReferences' => 2],
'response' => $this->readFixture("GET_workstation_with_process_resolved2.json")
],
[
'function' => 'readPostResult',
'url' => '/workstation/',
'response' => $this->readFixture("GET_workstation_with_process_resolved3.json")
'response' => $this->readFixture("GET_workstation_with_process_resolved2.json")
]
]
);
Expand Down
2 changes: 1 addition & 1 deletion zmsdb/src/Zmsdb/Department.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function readResolvedReferences(
if (0 < $resolveReferences) {
$entity['clusters'] = (new Cluster())->readByDepartmentId(
$entity->id,
$resolveReferences - 1,
max(1, $resolveReferences - 1),
$disableCache
);
$entity['dayoff'] = (new DayOff())->readOnlyByDepartmentId($entity->id, $disableCache);
Expand Down