diff --git a/app/Integrations/Core/System.php b/app/Integrations/Core/System.php index 4fe0c455e..87afeafcc 100644 --- a/app/Integrations/Core/System.php +++ b/app/Integrations/Core/System.php @@ -115,7 +115,7 @@ class System implements SystemContract return true; } - return !$this->config->get('suppress_notifications_in_maintenance'); + return !$this->config->get('setting.suppress_notifications_in_maintenance'); } /** diff --git a/app/Models/Schedule.php b/app/Models/Schedule.php index f5d1fd77f..c5f55a96d 100644 --- a/app/Models/Schedule.php +++ b/app/Models/Schedule.php @@ -161,7 +161,9 @@ class Schedule extends Model implements HasPresenter */ public function scopeInProgress(Builder $query) { - return $query->where('scheduled_at', '<=', Carbon::now())->whereNull('completed_at')->where('status', '!=', self::COMPLETE); + return $query->where('scheduled_at', '<=', Carbon::now())->where('status', '!=', self::COMPLETE)->where(function($query) { + $query->whereNull('completed_at')->orWhere('completed_at','>', Carbon::now()); + }); } /**