Fixes for missing invites for recurring invitations

This commit is contained in:
David Bomba 2022-08-05 11:12:50 +10:00
parent 6eab259568
commit 5371bed25b

View File

@ -63,6 +63,19 @@ class CreateRecurringInvitations extends AbstractService
info($e->getMessage()); info($e->getMessage());
} }
if ($this->entity->invitations()->count() == 0) {
$invitation = $this->invitation_class::where('company_id', $this->entity->company_id)
->where($this->entity_id_name, $this->entity->id)
->withTrashed()
->first();
if ($invitation)
$invitation->restore();
}
return $this->entity; return $this->entity;
} }
} }