This method would always fail for cached options because at the end it was expecting an Eloquent model, which would never be populated if the requested value was cached in the first place.

Uncached requests wouldn't fail because the exec path would lead to $value being a Model.

Also removed reference to old feature causing application page to crash.
This commit is contained in:
Miguel Nogueira 2020-12-08 00:07:53 +00:00
parent 8882804c6e
commit 6518ad3447
Signed by: miguel456
GPG Key ID: 2CF61B825316C6A0
3 changed files with 6 additions and 2 deletions

View File

@ -39,11 +39,13 @@ class Options
}
Cache::put($option, $value);
Cache::put($option.'_desc', 'Undefined description');
}
return $value->option_value;
}
return $value;
}
public function setOption(string $option, string $value, string $description)
{
Option::create([

View File

@ -37,6 +37,8 @@ class Team extends TeamworkTeam
return $this->belongsToMany('App\Vacancy', 'team_has_vacancy');
}
public function files()
{
return $this->hasMany('App\TeamFile', 'team_id');

View File

@ -348,7 +348,7 @@
<div class="col text-center">
<button type="button" class="btn btn-primary" onclick="window.location.href='{{route('staffPendingApps')}}'">{{__('messages.view_app.view_more')}}</button>
<button type="button" class="btn btn-primary" onclick="window.location.href='{{route('allApplications')}}'">{{__('messages.view_app.view_more')}}</button>
</div>