#19 Tests
* adds workflow tests for checkability and recordability for interventions * fixes/improves code snippets detected by testing
This commit is contained in:
@@ -5,7 +5,7 @@ from django.shortcuts import render
|
||||
|
||||
from intervention.forms.forms import NewInterventionForm, EditInterventionForm
|
||||
from intervention.forms.modalForms import ShareInterventionModalForm, NewRevocationModalForm, \
|
||||
RunCheckModalForm, NewDeductionModalForm
|
||||
CheckModalForm, NewDeductionModalForm
|
||||
from intervention.models import Intervention, Revocation, InterventionDocument, RevocationDocument
|
||||
from intervention.tables import InterventionTable
|
||||
from konova.contexts import BaseContext
|
||||
@@ -413,7 +413,7 @@ def create_share_view(request: HttpRequest, id: str):
|
||||
@login_required
|
||||
@registration_office_group_required
|
||||
@shared_access_required(Intervention, "id")
|
||||
def run_check_view(request: HttpRequest, id: str):
|
||||
def check_view(request: HttpRequest, id: str):
|
||||
""" Renders check form for an intervention
|
||||
|
||||
Args:
|
||||
@@ -424,7 +424,7 @@ def run_check_view(request: HttpRequest, id: str):
|
||||
|
||||
"""
|
||||
intervention = get_object_or_404(Intervention, id=id)
|
||||
form = RunCheckModalForm(request.POST or None, instance=intervention, user=request.user)
|
||||
form = CheckModalForm(request.POST or None, instance=intervention, user=request.user)
|
||||
return form.process_request(
|
||||
request,
|
||||
msg_success=_("Check performed"),
|
||||
|
||||
Reference in New Issue
Block a user