File tree 2 files changed +0
-14
lines changed
enterprise_subsidy/apps/transaction
2 files changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -182,19 +182,6 @@ def handle_lc_enrollment_revoked(**kwargs):
182
182
f"Writing Reversal for Transaction: { related_transaction } ."
183
183
)
184
184
185
- # On initial release we are only supporting learner initiated unenrollments for OCM courses.
186
- # OCM courses are identified by the lack of an external_reference on the Transaction object.
187
- # Externally referenced transactions can be unenrolled through the Django admin actions related to the
188
- # Transaction model.
189
- automatic_external_cancellation = getattr (settings , "ENTERPRISE_SUBSIDY_AUTOMATIC_EXTERNAL_CANCELLATION" , False )
190
- if related_transaction .external_reference .exists () and not automatic_external_cancellation :
191
- logger .info (
192
- f"Found unenrolled enterprise fulfillment: { fulfillment_uuid } related to "
193
- f"an externally referenced transaction: { related_transaction .external_reference .first ()} . "
194
- f"Skipping ENTERPRISE_SUBSIDY_AUTOMATIC_EXTERNAL_CANCELLATION={ automatic_external_cancellation } ."
195
- )
196
- return
197
-
198
185
# NOTE: get_content_metadata() is backed by TieredCache, so this would be performant if a bunch learners unenroll
199
186
# from the same course at the same time. However, normally no two learners in the same course would unenroll within
200
187
# a single cache timeout period, so we'd expect this to normally always re-fetch from remote API. That's OK because
Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ def test_transaction_reversed_signal_without_fulfillment_identifier(
141
141
@mock .patch ('enterprise_subsidy.apps.transaction.signals.handlers.reverse_transaction' )
142
142
@mock .patch ('enterprise_subsidy.apps.transaction.signals.handlers.unenrollment_can_be_refunded' )
143
143
@mock .patch ('enterprise_subsidy.apps.transaction.signals.handlers.ContentMetadataApi.get_content_metadata' )
144
- @override_settings (ENTERPRISE_SUBSIDY_AUTOMATIC_EXTERNAL_CANCELLATION = True )
145
144
def test_handle_lc_enrollment_revoked (
146
145
self ,
147
146
mock_get_content_metadata ,
You can’t perform that action at this time.
0 commit comments