From 5a3fc7eb3fceb7115678e71d0683ab73392b0663 Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Thu, 11 Jul 2024 14:48:50 -0500 Subject: [PATCH] feat: dont import ExtraInfo in initialization --- eox_nelp/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eox_nelp/utils.py b/eox_nelp/utils.py index 78b21b8c..72e021fe 100644 --- a/eox_nelp/utils.py +++ b/eox_nelp/utils.py @@ -1,8 +1,8 @@ """Utils that can be used for the plugin project""" import re from copy import copy +from importlib import import_module -from custom_reg_form.models import ExtraInfo from opaque_keys.edx.keys import CourseKey from eox_nelp.edxapp_wrapper.course_overviews import get_course_overviews @@ -166,6 +166,7 @@ def save_extrainfo_field(user, field, value): field (string): value (any): """ + ExtraInfo = import_module("custom_reg_form.models").ExtraInfo if not hasattr(ExtraInfo, field): return