From 01ef094c8248d9dfd2807142ea8e78da71413c8b Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Tue, 16 Apr 2019 13:31:42 -0400 Subject: Fix quick booking image filtering bug Change-Id: I9fe5b34be2113d3bf7d2e763730b6658f529d387 Signed-off-by: Sawyer Bergeron --- src/booking/forms.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/booking/forms.py b/src/booking/forms.py index 9349ac1..de427ab 100644 --- a/src/booking/forms.py +++ b/src/booking/forms.py @@ -41,9 +41,7 @@ class QuickBookingForm(forms.Form): super(QuickBookingForm, self).__init__(data=data, **kwargs) self.fields["image"] = forms.ModelChoiceField( - queryset=Image.objects.difference( - Image.objects.filter(public=False).difference(Image.objects.filter(owner=user)) - ) + Image.objects.filter(public=True) | Image.objects.filter(owner=user) ) self.fields['users'] = forms.CharField( -- cgit 1.2.3-korg