Fix initializeMembers
This commit is contained in:
parent
5776c6c8fb
commit
63273015c7
|
@ -74,6 +74,7 @@ class InitializeMembers {
|
|||
'version' => $member->version,
|
||||
]);
|
||||
|
||||
try {
|
||||
foreach ($this->api->coursesFor($member->id) as $course) {
|
||||
$m->courses()->create([
|
||||
'course_id' => Course::where('nami_id', $course->course_id)->firstOrFail()->id,
|
||||
|
@ -83,7 +84,11 @@ class InitializeMembers {
|
|||
'nami_id' => $course->id,
|
||||
]);
|
||||
}
|
||||
} catch (RightException $e) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
foreach ($this->api->membershipsOf($member->id) as $membership) {
|
||||
if ($membership['entries_aktivBis'] !== '') {
|
||||
continue;
|
||||
|
@ -104,6 +109,9 @@ class InitializeMembers {
|
|||
'subactivity_id' => $subactivityId,
|
||||
]);
|
||||
}
|
||||
} catch (RightException $e) {
|
||||
|
||||
}
|
||||
} catch (ModelNotFoundException $e) {
|
||||
dd($e->getMessage(), $member);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue