summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-15 00:07:16 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-15 00:07:16 +0200
commitdf43f19a2f61bffe4fc89baef578dd7ecb0005cc (patch)
tree880eff06a16fa8537231bab8e79ca9114c68419f /archaeological_operations
parentf87aa359f5c0dcf7372dca67690fc1baf1178b86 (diff)
downloadIshtar-df43f19a2f61bffe4fc89baef578dd7ecb0005cc.tar.bz2
Ishtar-df43f19a2f61bffe4fc89baef578dd7ecb0005cc.zip
Add QA for orgas and operations
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/forms.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 3c93b945c..8ddd42708 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -1806,6 +1806,7 @@ class QAOperationFormMulti(QAForm):
base_models = ['qa_operation_type']
associated_models = {
'qa_operation_type': models.OperationType,
+ 'qa_towns': Town
}
MULTI = True
@@ -1815,8 +1816,16 @@ class QAOperationFormMulti(QAForm):
qa_operation_type = forms.ChoiceField(
label=_(u"Operation type"), required=False
)
+ qa_towns = get_town_field(required=False)
TYPES = [
FieldType('qa_operation_type', models.OperationType),
]
+ def _get_qa_towns(self, value):
+ try:
+ value = Town.objects.get(pk=value).cached_label
+ except Town.DoesNotExist:
+ return ""
+ return value
+