Commit c6a45960 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added 404 to the view as well

parent b9952501
......@@ -234,6 +234,10 @@ class SellListing(LoginRequiredMixin, UpdateView):
if not(selling_student == me):
raise Http404
flag_count = Flag.objects.filter(listing=self.get_object()).count()
if flag_count < 1:
raise Http404
today = date.today()
form = SellListingForm(initial={'sold' : True, 'date_closed' : today})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment