Skip to content
Browse files

So here's to you, Mr. URL-By-Hand-Constructor.

  • Loading branch information...
1 parent 82276c1 commit eb331126a039d35e47e55e39c93d3df9dd73d392 @jacobian jacobian committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 django_website/docs/forms.py
View
3 django_website/docs/forms.py
@@ -14,12 +14,13 @@ def __init__(self, *args, **kwargs):
queryset = DocumentRelease.objects.all().order_by('version'),
initial = DocumentRelease.objects.default(),
empty_label = None,
+ required = False,
)
def search(self):
sqs = super(DocSearchForm, self).search()
if self.is_valid():
- rel = self.cleaned_data['release']
+ rel = self.cleaned_data['release'] or DocumentRelease.objects.default()
sqs = sqs.filter(lang=rel.lang, version=rel.version)
return sqs

0 comments on commit eb33112

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