Skip to content
Browse files

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

This happens with manual querystring hacking sometimes.
  • Loading branch information...
1 parent 821f1ef commit 20e61b96744f3d902cc51ad9bf5a6591b6e0636b @jacobian jacobian committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django_website/docs/
2 django_website/docs/
@@ -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):

0 comments on commit 20e61b9

Please sign in to comment.
Something went wrong with that request. Please try again.