From 8beff03e0f1b32d4540df6c656446c95d2993dbb Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 28 Mar 2018 11:09:53 +0200 Subject: Make step by step import an experimental feature (refs #3975) --- ishtar_common/models_imports.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ishtar_common/models_imports.py') diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py index cd8865eca..9afd435da 100644 --- a/ishtar_common/models_imports.py +++ b/ishtar_common/models_imports.py @@ -896,17 +896,21 @@ class Import(models.Model): """ Get available action relevant with the current status """ + from ishtar_common.models import IshtarSiteProfile + profile = IshtarSiteProfile.get_current_profile() actions = [] if self.state == 'C': actions.append(('A', _(u"Analyse"))) if self.state == 'A': actions.append(('A', _(u"Re-analyse"))) actions.append(('I', _(u"Launch import"))) - actions.append(('IS', _(u"Step by step import"))) + if profile.experimental_feature: + actions.append(('IS', _(u"Step by step import"))) if self.state in ('F', 'FE'): actions.append(('A', _(u"Re-analyse"))) actions.append(('I', _(u"Re-import"))) - actions.append(('IS', _(u"Step by step import"))) + if profile.experimental_feature: + actions.append(('IS', _(u"Step by step import"))) actions.append(('AC', _(u"Archive"))) if self.state == 'AC': actions.append(('A', _(u"Unarchive"))) -- cgit v1.2.3