-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: point to new models in channel_migrations app #37654
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,8 +26,6 @@ | |
| from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication | ||
| from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser | ||
| from enterprise.models import EnterpriseCourseEnrollment, EnterpriseCustomerUser, PendingEnterpriseCustomerUser | ||
| from integrated_channels.degreed.models import DegreedLearnerDataTransmissionAudit | ||
| from integrated_channels.sap_success_factors.models import SapSuccessFactorsLearnerDataTransmissionAudit | ||
| from rest_framework import permissions, status | ||
| from rest_framework.authentication import SessionAuthentication | ||
| from rest_framework.exceptions import UnsupportedMediaType | ||
|
|
@@ -97,6 +95,15 @@ | |
| from .signals import USER_RETIRE_LMS_CRITICAL, USER_RETIRE_LMS_MISC, USER_RETIRE_MAILINGS | ||
| from .utils import create_retirement_request_and_deactivate_account, username_suffix_generator | ||
|
|
||
| # This is a temporary import path while we transition from integrated_channels to channel_integrations | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as above.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same reply as above. |
||
| if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True): | ||
| from integrated_channels.degreed.models import DegreedLearnerDataTransmissionAudit | ||
| from integrated_channels.sap_success_factors.models import SapSuccessFactorsLearnerDataTransmissionAudit | ||
| else: | ||
| from channel_integrations.degreed2.models import Degreed2LearnerDataTransmissionAudit \ | ||
| as DegreedLearnerDataTransmissionAudit | ||
| from channel_integrations.sap_success_factors.models import SapSuccessFactorsLearnerDataTransmissionAudit | ||
|
|
||
| log = logging.getLogger(__name__) | ||
|
|
||
| USER_PROFILE_PII = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,14 +11,14 @@ | |
|
|
||
| from consent.models import DataSharingConsent | ||
| from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user | ||
| from django.conf import settings | ||
| from django.core.management.base import BaseCommand | ||
| from enterprise.models import ( | ||
| EnterpriseCourseEnrollment, | ||
| EnterpriseCustomer, | ||
| EnterpriseCustomerUser, | ||
| PendingEnterpriseCustomerUser | ||
| ) | ||
| from integrated_channels.sap_success_factors.models import SapSuccessFactorsLearnerDataTransmissionAudit | ||
| from opaque_keys.edx.keys import CourseKey | ||
| from zoneinfo import ZoneInfo | ||
|
|
||
|
|
@@ -31,6 +31,12 @@ | |
|
|
||
| from ...models import UserOrgTag | ||
|
|
||
| # This is a temporary import path while we transition from integrated_channels to channel_integrations | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True): | ||
| from integrated_channels.sap_success_factors.models import SapSuccessFactorsLearnerDataTransmissionAudit | ||
| else: | ||
| from channel_integrations.sap_success_factors.models import SapSuccessFactorsLearnerDataTransmissionAudit | ||
|
|
||
|
|
||
| class Command(BaseCommand): | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,10 +10,6 @@ | |
| from django.db.models.signals import post_save, pre_save | ||
| from django.dispatch import receiver | ||
| from enterprise.models import EnterpriseCourseEnrollment, EnterpriseCustomer | ||
| from integrated_channels.integrated_channel.tasks import ( | ||
| transmit_single_learner_data, | ||
| transmit_single_subsection_learner_data | ||
| ) | ||
| from slumber.exceptions import HttpClientError | ||
|
|
||
| from common.djangoapps.student.signals import UNENROLL_DONE | ||
|
|
@@ -22,6 +18,18 @@ | |
| from openedx.features.enterprise_support.tasks import clear_enterprise_customer_data_consent_share_cache | ||
| from openedx.features.enterprise_support.utils import clear_data_consent_share_cache, is_enterprise_learner | ||
|
|
||
| # This is a temporary import path while we transition from integrated_channels to channel_integrations | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True): | ||
| from integrated_channels.integrated_channel.tasks import ( | ||
| transmit_single_learner_data, | ||
| transmit_single_subsection_learner_data | ||
| ) | ||
| else: | ||
| from channel_integrations.integrated_channel.tasks import ( | ||
| transmit_single_learner_data, | ||
| transmit_single_subsection_learner_data | ||
| ) | ||
|
|
||
| log = logging.getLogger(__name__) | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a timeline or link to a publicly available ticket to this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a publicly available ticket but this will be done as soon as we can test the changes on
edx/edx-platformrepo and confirm everything is working.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this to the core settings file
opened/envs/common.pyand add a full toggle annotation? By keeping all of our settings in the centralenvs/files, it helps us keep track of them and document them. And as Deborah mentioned pleased create an edx-platform GitHub issue and include a link to it in the.. toggle_tickets. You can declare the default asTruethere.Furthermore, please access the setting directly (
settings.ENABLE_LEGACY_INTEGRATED_CHANNELS) in all places instead of usinggetattr. This way, we will get a helpful exception if the setting name is misspelled or if any setting references are accidentally left behind once the definition is removed.