You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should also look at the situations which would cause a null date_due. Is this problematic in other situations? Should this be allowable?
If date_due is null, we get the following error:
[2020-12-26 02:00:19] prod.ERROR: Call to a member function diffInDays() on null {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function diffInDays() on null at /var/app/current/app/Console/Kernel.php:47)
We should probably also wrap all of the code inside the module_assignment loop with a try/catch so that it will continue in the event that ANYTHING fails within the loop (around line 43):
//Checks all of the assignment due dates to send emails to usersforeach($module_assignmentsas$assignment){
// ADD A "try" block here!!$module = $modules->where('id',$assignment->module_id)->first();
$user = $assignment->user()->where('id',$assignment->user_id)->first();
The text was updated successfully, but these errors were encountered:
The most up to date code is now in the BComply environment and it seems to be working fine so far. I will post another update once we think everything is working as expected and we are ready to go live. In order for me to complete the tests, I will need to wait for Bulk Assignment to run tomorrow (at 2am or 2:30am?) as scheduled.
In app/Console/Kernel.php around like 47:
We Need to confirm that $assignment->date_due is not null before continuing:
We should also look at the situations which would cause a null date_due. Is this problematic in other situations? Should this be allowable?
If date_due is null, we get the following error:
We should probably also wrap all of the code inside the module_assignment loop with a try/catch so that it will continue in the event that ANYTHING fails within the loop (around line 43):
The text was updated successfully, but these errors were encountered: