[#31605173] This plugs .../pledge/work_id where work_id tied to no campaign or a campaign that is not ACTIVE
parent
4bb48c64e6
commit
d37792c813
|
@ -56,5 +56,8 @@ class Command(BaseCommand):
|
|||
# NONE status -- follow up on?
|
||||
|
||||
|
||||
# tally up different classes of statuses we have for c3
|
||||
|
||||
|
||||
# who has modified a transaction and never cancelled it?
|
||||
|
||||
|
|
|
@ -552,9 +552,12 @@ class PledgeView(FormView):
|
|||
work = get_object_or_404(models.Work, id=self.kwargs["work_id"])
|
||||
campaign = work.last_campaign()
|
||||
|
||||
if campaign:
|
||||
premiums = campaign.effective_premiums()
|
||||
|
||||
# if there is no campaign or if campaign is not active, we should raise an error
|
||||
|
||||
if campaign is None or campaign.status != 'ACTIVE':
|
||||
raise Http404
|
||||
|
||||
premiums = campaign.effective_premiums()
|
||||
premium_id = self.request.REQUEST.get('premium_id', None)
|
||||
preapproval_amount = self.request.REQUEST.get('preapproval_amount', None)
|
||||
|
||||
|
|
Loading…
Reference in New Issue