Skip to content

Commit

Permalink
fix constraint check bug
Browse files Browse the repository at this point in the history
  • Loading branch information
schorschii committed May 7, 2020
1 parent 156494d commit faf8c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/autoplan.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function checkUserConstraintOrAbsent($user_id, $service_id, $day) {
// check user constraints
$wd = date('N', strtotime($day));
foreach($this->dbhandle->getUserConstraints($user_id) as $uc) {
if($uc->service_id == null || $uc->service_id = $service_id) {
if($uc->service_id == null || $uc->service_id == $service_id) {
if($wd == 1 && $uc->wd1 == 1) return false;
if($wd == 2 && $uc->wd2 == 1) return false;
if($wd == 3 && $uc->wd3 == 1) return false;
Expand Down

0 comments on commit faf8c7c

Please sign in to comment.