Skip to content
Snippets Groups Projects
Unverified Commit e71cfb28 authored by Brian Mesick's avatar Brian Mesick Committed by GitHub
Browse files

Merge pull request #17879 from edx/bmedx/remove_default_site_from_attributes

Exclude the default site from UserAttribute 'created_on_site'
parents eb007720 88153b7a
No related merge requests found
......@@ -402,9 +402,12 @@ def generate_activation_email_context(user, registration):
def create_or_set_user_attribute_created_on_site(user, site):
"""
Create or Set UserAttribute indicating the microsite site the user account was created on.
User maybe created on 'courses.edx.org', or a white-label site
User maybe created on 'courses.edx.org', or a white-label site. Due to the very high
traffic on this table we now ignore the default site (eg. 'courses.edx.org') and
code which comsumes this attribute should assume a 'created_on_site' which doesn't exist
belongs to the default site.
"""
if site:
if site and site.id != settings.SITE_ID:
UserAttribute.set_user_attribute(user, 'created_on_site', site.domain)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment