diff --git a/frontend/views.py b/frontend/views.py index f50d1d6f..2846c93c 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -805,16 +805,19 @@ def rh_tools(request): if not claims: return render(request, "rh_tools.html") for claim in claims: - claim.campaigns= claim.work.campaigns.all() + if claim.status == 'active': + claim.campaigns = claim.work.campaigns.all() + else: + claim.campaigns = [] claim.can_open_new=True for campaign in claim.campaigns: if campaign.status in ['ACTIVE','INITIALIZED']: claim.can_open_new=False - if campaign.status == 'ACTIVE': if request.method == 'POST' and request.POST.has_key('edit_managers_%s'% campaign.id) : campaign.edit_managers_form=EditManagersForm( instance=campaign, data=request.POST, prefix=campaign.id) if campaign.edit_managers_form.is_valid(): campaign.edit_managers_form.save() + campaign.edit_managers_form = EditManagersForm(instance=campaign, prefix=campaign.id) else: campaign.edit_managers_form=EditManagersForm(instance=campaign, prefix=campaign.id) if claim.status == 'active' and claim.can_open_new: