From 8d632aadb8d71381b0ec2dcd934aa92f958dc7d3 Mon Sep 17 00:00:00 2001 From: zubair-ce07 Date: Thu, 19 Oct 2023 19:06:40 +0500 Subject: [PATCH] fix: updated migration --- .../catalogue/migrations/0027_catalogue_entitlement_option.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecommerce/extensions/catalogue/migrations/0027_catalogue_entitlement_option.py b/ecommerce/extensions/catalogue/migrations/0027_catalogue_entitlement_option.py index b8bdc3bd48d..34c8ec15465 100644 --- a/ecommerce/extensions/catalogue/migrations/0027_catalogue_entitlement_option.py +++ b/ecommerce/extensions/catalogue/migrations/0027_catalogue_entitlement_option.py @@ -4,21 +4,21 @@ from django.db import migrations, models from oscar.core.loading import get_model -Option = get_model('catalogue', 'Option') def create_entitlement_option(apps, schema_editor): """ Create catalogue entitlement option. """ + Option = apps.get_model('catalogue', 'Option') Option.skip_history_when_saving = True course_entitlement_option = Option() course_entitlement_option.name = 'Course Entitlement' course_entitlement_option.code = 'course_entitlement' - course_entitlement_option.type = 'Optional' course_entitlement_option.save() def remove_entitlement_option(apps, schema_editor): """ Remove course entitlement option """ + Option = apps.get_model('catalogue', 'Option') Option.skip_history_when_saving = True course_entitlement_option = Option.objects.get(code='course_entitlement') course_entitlement_option.delete()