Fixed an issue where a queryset filter argument didn't have the right datatype.

- Legacy-Id: 12403
This commit is contained in:
Henrik Levkowetz 2016-11-28 18:05:14 +00:00
parent 7c2a1b2ee4
commit 671df0492a

View file

@ -38,7 +38,7 @@ class UploadMaterialForm(forms.Form):
def __init__(self, doc_type, action, group, doc, *args, **kwargs):
super(UploadMaterialForm, self).__init__(*args, **kwargs)
self.fields["state"].queryset = self.fields["state"].queryset.filter(type=doc_type)
self.fields["state"].queryset = self.fields["state"].queryset.filter(type__slug=doc_type.slug)
self.doc_type = doc_type
self.action = action