From 7c475640856a7490ab159be3cb60cdab45e7719b Mon Sep 17 00:00:00 2001 From: Vladislav Yakovlev <vlad309523@gmail.com> Date: Sun, 28 Jan 2018 23:23:03 +0300 Subject: [PATCH] FIX: sync create subject for discipline without teachers [2] --- .../application/classes/Controller/Api/V0/StudyPlan.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/~dev_rating/application/classes/Controller/Api/V0/StudyPlan.php b/~dev_rating/application/classes/Controller/Api/V0/StudyPlan.php index 980efb884..d959226b0 100644 --- a/~dev_rating/application/classes/Controller/Api/V0/StudyPlan.php +++ b/~dev_rating/application/classes/Controller/Api/V0/StudyPlan.php @@ -18,9 +18,7 @@ class Controller_Api_V0_StudyPlan extends Controller_Handler_Api { } if (empty($disciplineData->teacherIDs)) { - if (!empty($disciplineData->teachers)) { - throw new InvalidArgumentException('Discipline without teachers'); - } + throw new InvalidArgumentException('Discipline without teachers'); } switch ($disciplineData->type) { -- GitLab