Esempio n. 1
0
def validate_post_accreditation_level(request):
    tender = request.validated["tender"]
    levels = tender.edit_accreditations
    validate_accreditation_level(request, levels, "procurementMethodType",
                                 "post", "creation")
    mode = tender.get("mode", None)
    validate_accreditation_level_mode(request, mode, "procurementMethodType",
                                      "post", "creation")
Esempio n. 2
0
def validate_plan_accreditation_level_mode(request):
    data = request.validated["data"]
    mode = data.get("mode", None)
    validate_accreditation_level_mode(request, mode, "plan", "plan", "creation")
def validate_tender_accreditation_level_mode(request):
    data = request.validated["data"]
    mode = data.get("mode", None)
    validate_accreditation_level_mode(request, mode, "procurementMethodType",
                                      "tender", "creation")
Esempio n. 4
0
def validate_transfer_accreditation_level(request, obj, attr):
    levels = getattr(type(obj), attr)
    validate_accreditation_level(request, levels, "ownership", "ownership", "change")
    mode = obj.get("mode", None)
    validate_accreditation_level_mode(request, mode, "ownership", "ownership", "change")