Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use the default release if it isn't in the form.

This happens with manual querystring hacking sometimes.
  • Loading branch information...
commit 20e61b96744f3d902cc51ad9bf5a6591b6e0636b 1 parent 821f1ef
@jacobian jacobian authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django_website/docs/forms.py
View
2  django_website/docs/forms.py
@@ -18,7 +18,7 @@ def __init__(self, *args, **kwargs):
def search(self):
sqs = super(DocSearchForm, self).search()
- rel = self.cleaned_data['release']
+ rel = self.cleaned_data.get('release', DocumentRelease.objects.default())
return sqs.filter(lang=rel.lang, version=rel.version)
class DocumentReleaseChoiceField(forms.ModelChoiceField):
Please sign in to comment.
Something went wrong with that request. Please try again.