Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compare emails case-insensitively when setting assignment lms_user_ids #362

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

iloveagent57
Copy link
Contributor

ENT-8129 | The email stored on assignment records might be only a case-insensitive match to the corresponding email in the core.User records, so do case-insensitive matching during the assignment flow and during the post-user-save signal that updates assignment lms_user_ids.

Copy link
Contributor

@pwnage101 pwnage101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest LGTM!

# OR type of query.
email_filter = Q()
for assignment_email in emails:
email_filter |= Q(email__iexact=assignment_email)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think this would increase the statement length (adding a string of OR email checks instead of a flat list of emails). Might be worth halving USER_EMAIL_READ_BATCH_SIZE to 175 just to be safe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tuned it down to a nice even 100.

…er_ids

ENT-8129 | The email stored on assignment records might be only a case-insensitive
match to the corresponding email in the core.User records, so do case-insensitive
matching during the assignment flow and during the post-user-save signal
that updates assignment ``lms_user_ids``.
@iloveagent57 iloveagent57 dismissed pwnage101’s stale review December 12, 2023 19:33

feedback addressed

@iloveagent57 iloveagent57 merged commit bc30d18 into main Dec 12, 2023
3 checks passed
@iloveagent57 iloveagent57 deleted the aed/like-being-low branch December 12, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants