示例#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")
示例#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")
示例#4
0
文件: validation.py 项目: lttga/op2
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")