]> git.parisson.com Git - telemeta.git/commitdiff
Fix filter physical format
authormathieu <mathieu.boye28@gmail.com>
Tue, 3 May 2016 06:37:22 +0000 (08:37 +0200)
committermathieu <mathieu.boye28@gmail.com>
Tue, 3 May 2016 06:37:22 +0000 (08:37 +0200)
telemeta/forms/haystack_form.py

index de0225590b72598ef76e6300fc0166c3b146c32c..cb6e61f8c9a1ea11c2befb946c9c1b3982605505 100644 (file)
@@ -205,8 +205,7 @@ class HayAdvanceForm(SearchForm):
             if self.cleaned_data.get('ethnic_group') != '':
                 sqs = sqs.filter(ethnic_group__contains=self.cleaned_data['ethnic_group'])
 
-        if self.cleaned_data.get('instruments'):#
-            print(self.filterInstru(self.cleaned_data['instruments']))
+        if self.cleaned_data.get('instruments'):
             sqs = sqs.filter(self.filterInstru(self.cleaned_data['instruments']))
 
         if self.cleaned_data.get('collectors'):
@@ -245,7 +244,7 @@ class HayAdvanceForm(SearchForm):
                 sqs = sqs.filter(recording_context=self.cleaned_data['recording_context'])
 
         if self.cleaned_data['physical_format']:
-            if self.cleaned_data.get('physical_formate') != '':
+            if self.cleaned_data.get('physical_format') != '':
                 sqs = sqs.filter(physical_format=self.cleaned_data['physical_format'])
 
         return sqs
@@ -261,5 +260,4 @@ def getclosebracket(tab):
             par -= 1
         if par !=0:
             index+= 1
-    return index if par == 0 else -1
-#
\ No newline at end of file
+    return index if par == 0 else -1
\ No newline at end of file