Skip to content

Commit 2ba2233

Browse files
Refactor imports to happen when methods called (fixes
intecomm-form-validators tests failing to run)
1 parent 81d33c7 commit 2ba2233

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

edc_consent/consent_definition.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
ConsentDefinitionValidityPeriodError,
1919
NotConsentedError,
2020
)
21-
from .managers import ConsentObjectsByCdefManager, CurrentSiteByCdefManager
2221

2322
if TYPE_CHECKING:
2423
from edc_model.models import BaseUuidModel
@@ -79,6 +78,8 @@ def __post_init__(self):
7978

8079
@property
8180
def model(self):
81+
from .managers import ConsentObjectsByCdefManager, CurrentSiteByCdefManager
82+
8283
model_cls = django_apps.get_model(self._model)
8384
if not model_cls._meta.proxy:
8485
raise ConsentDefinitionError(

0 commit comments

Comments
 (0)