Skip to content

Commit

Permalink
fix: account activation email site logo is not themed
Browse files Browse the repository at this point in the history
Fix the issue when the email sent from the microsite with its own theme
has the logo from the main site.

Preconditions:
- microsite with its own theme is up and running

STR:
- Create a new account on the microsite;
- Check your email inbox.
  • Loading branch information
dyudyunov committed Feb 16, 2022
1 parent 2133ec2 commit 2ae94d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/djangoapps/student/email_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from openedx.core.djangoapps.ace_common.template_context import get_base_template_context
from openedx.core.djangoapps.enrollments.api import is_enrollment_valid_for_proctoring
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
from openedx.core.djangoapps.theming import helpers as theming_helpers
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order


Expand All @@ -22,7 +23,8 @@ def generate_activation_email_context(user, registration):
user (User): Currently logged-in user
registration (Registration): Registration object for the currently logged-in user
"""
context = get_base_template_context(None)
site = theming_helpers.get_current_site()
context = get_base_template_context(site)
context.update({
'name': user.profile.name,
'key': registration.activation_key,
Expand Down

0 comments on commit 2ae94d0

Please sign in to comment.