misc: always prefix imported modules with wcs. (#34918)
This commit is contained in:
parent
e63b627403
commit
498b807d34
|
@ -52,11 +52,11 @@ from qommon.admin.logger import LoggerDirectory
|
|||
import qommon.ident
|
||||
import qommon.template
|
||||
|
||||
from formdef import FormDef
|
||||
from workflows import Workflow
|
||||
from fields import FieldDefPage, FieldsDirectory
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.roles import Role
|
||||
|
||||
from .fields import FieldDefPage, FieldsDirectory
|
||||
from .data_sources import NamedDataSourcesDirectory
|
||||
from .wscalls import NamedWsCallsDirectory
|
||||
|
||||
|
|
|
@ -247,6 +247,8 @@ class FormDef(StorableObject):
|
|||
cur.close()
|
||||
|
||||
def data_class(self, mode=None):
|
||||
if not 'formdef' in sys.modules:
|
||||
sys.modules['formdef'] = sys.modules[__name__]
|
||||
if hasattr(sys.modules['formdef'], self.url_name.title()):
|
||||
data_class = getattr(sys.modules['formdef'], self.url_name.title())
|
||||
# only use existing data class if it has a reference to this actual
|
||||
|
|
|
@ -24,7 +24,7 @@ from qommon.publisher import get_publisher_class
|
|||
|
||||
from qommon.vendor import locket
|
||||
from qommon.cron import cron_worker
|
||||
from wf.jump import JUMP_TIMEOUT_INTERVAL
|
||||
from wcs.wf.jump import JUMP_TIMEOUT_INTERVAL
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
|
Loading…
Reference in New Issue