Students not being assigned to cohorts

Hi,

We are running a couple instance of Openedx using tutor local. We have a few courses setup on each, and have setup cohorts - we have created cohorts and invited students who have not yet registered on the platform to the cohort. We get the warning message saying this student has not yet registered on the platform. The student is then invited to enroll on the course via the bulk enroll component. They get the enrollment email, register and activate their account. We can see that the student has successfully enrolled on the course, but they are not assigned to the cohort.

If the student has already registered on the platform, and already enrolled on the course then they are assigned without issue.

We can also see the students listed in course_groups_unregisteredlearnercohortassignments. Is there some task or something which should be automatically triggered/ can be manually triggered to run the assignment?

We’re also not seeing any errors in the logs, or any failed tasks.