diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-07-04 01:02:14 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-07-04 01:02:14 +0200 |
commit | d5ddabd3098f5e6cd2a98ff3a037dcb2da011391 (patch) | |
tree | a16d028952f536a80ec6642af2b0f115cf4caf69 /ishtar/ishtar_base/forms_operations.py | |
parent | f6dc6ffebbe7c85acb1d19021757abbacf363566 (diff) | |
download | Ishtar-d5ddabd3098f5e6cd2a98ff3a037dcb2da011391.tar.bz2 Ishtar-d5ddabd3098f5e6cd2a98ff3a037dcb2da011391.zip |
Hide an inappropriate warning message (closes #485)
Diffstat (limited to 'ishtar/ishtar_base/forms_operations.py')
-rw-r--r-- | ishtar/ishtar_base/forms_operations.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ishtar/ishtar_base/forms_operations.py b/ishtar/ishtar_base/forms_operations.py index 8b10f6e38..7274e66b5 100644 --- a/ishtar/ishtar_base/forms_operations.py +++ b/ishtar/ishtar_base/forms_operations.py @@ -173,10 +173,10 @@ class OperationWizard(Wizard): Show a specific warning if no archaelogical file is provided """ datas = super(OperationWizard, self).get_formated_datas(forms) - # simple selection town is used if no Archaelogical File is provided - has_af = [form for form in forms - if isinstance(form, SelectedTownFormSet)] - if not has_af: + # if the general town form is used the advertissement is pertinent + has_no_af = [form.prefix for form in forms + if form.prefix == 'townsgeneral-operation'] and True + if has_no_af: datas = [[_(u"Warning: No Archaelogical File is provided. " u"If you have forget it return to the first step."), []]]\ + datas |