From 2cb7f5b80af8dc461da93d923b672512e1c064cc Mon Sep 17 00:00:00 2001 From: Sergey Klyuykov Date: Tue, 6 Aug 2019 16:25:37 +1000 Subject: [PATCH] Fix recurcive import for serializers polemarch/ce#221 --- polemarch/__init__.py | 2 +- polemarch/api/v2/serializers.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/polemarch/__init__.py b/polemarch/__init__.py index 83e18735..0a640025 100644 --- a/polemarch/__init__.py +++ b/polemarch/__init__.py @@ -31,6 +31,6 @@ "VST_ROOT_URLCONF": os.getenv("VST_ROOT_URLCONF", 'vstutils.urls'), } -__version__ = "1.3.1" +__version__ = "1.4.0" prepare_environment(**default_settings) diff --git a/polemarch/api/v2/serializers.py b/polemarch/api/v2/serializers.py index 4f7a0f1a..e93c6207 100644 --- a/polemarch/api/v2/serializers.py +++ b/polemarch/api/v2/serializers.py @@ -19,7 +19,6 @@ from ...main.utils import AnsibleArgumentsReference, AnsibleInventoryParser from ...main.models import Inventory -from ...main.repo._base import _Base as base_repo_class from ...main import models from ..signals import api_post_save, api_pre_save @@ -420,7 +419,7 @@ class PeriodicTaskVariableSerializer(VariableSerializer): class ProjectVariableSerializer(VariableSerializer): key = vst_fields.AutoCompletionField( required=True, - autocomplete=models.Project.VARS_KEY+['ci_'+i for i in base_repo_class.handler_class.ci_types.keys()] + autocomplete=models.Project.VARS_KEY+['ci_template'] ) value = vst_fields.DependEnumField(allow_blank=True, field='key', choices={ 'repo_type': list(models.Project.repo_handlers.keys()),