Skip to content

fix: correct fallback handling for email opt-in report#38410

Draft
ajayakkalasetti wants to merge 1 commit intoopenedx:masterfrom
ajayakkalasetti:fix/email-optin-report-fallback-values
Draft

fix: correct fallback handling for email opt-in report#38410
ajayakkalasetti wants to merge 1 commit intoopenedx:masterfrom
ajayakkalasetti:fix/email-optin-report-fallback-values

Conversation

@ajayakkalasetti
Copy link
Copy Markdown

Summary

Fixes incorrect fallback behavior in the Email Opt-In report where users without an email preference record were assigned misleading default values.

Problem

The report currently assigns:

  • is_opted_in_for_email = "True" (hardcoded)
  • preference_set_datetime = "2014-12-01 00:00:00" (hardcoded default)

when no corresponding record exists in user_api_userorgtag.

Solution

  • Removed the hardcoded fallback date

  • Avoid defaulting is_opted_in_for_email to "True"

  • Instead:

    • Leave preference_set_datetime empty when no value exists
    • Leave is_opted_in_for_email empty when no preference is set

    Amal please take a look on it.

@ajayakkalasetti ajayakkalasetti force-pushed the fix/email-optin-report-fallback-values branch from 8b5dfe7 to fa866c0 Compare April 22, 2026 14:14
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.

2 participants