예제 #1
0
def _validate_plan_accreditation_level(request, model):
    _validate_accreditation_level(request, model.create_accreditations, "plan",
                                  "creation")
예제 #2
0
def _validate_agreement_accreditation_level(request, model, **kwargs):
    levels = model.create_accreditations
    _validate_accreditation_level(request, levels, "agreement", "creation")
예제 #3
0
def validate_framework_accreditation_level_central(request, model):
    _validate_accreditation_level(request, model.central_accreditations, "framework", "creation")
def _validate_contract_accreditation_level(request, model):
    _validate_accreditation_level(request, model.create_accreditations,
                                  "contract", "creation")
예제 #5
0
def _validate_post_accreditation_level(request, **kwargs):
    tender = request.validated["tender"]
    mode = tender.get("mode", None)
    _validate_accreditation_level(request, tender.edit_accreditations, "post",
                                  "creation")
    _validate_accreditation_level_mode(request, mode, "post", "creation")
예제 #6
0
def _validate_transfer_accreditation_level(request, obj, attr):
    levels = getattr(type(obj), attr)
    mode = obj.get("mode", None)
    _validate_accreditation_level(request, levels, "ownership", "change")
    _validate_accreditation_level_mode(request, mode, "ownership", "change")