fix(pl): 三方车辆与人员保存跳过必备证书校验
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
db4907ec28
commit
b071687a71
3 files changed
+79
-3
No files matched your search
@@ -706,6 +706,7 @@ def create_personnel(
|
||||
validate_personnel_required_certs(
|
||||
payload.cert_list,
|
||||
payload.personnel_type,
|
||||
personnel_affiliation=payload.personnel_affiliation,
|
||||
subject_label=f"「{payload.personnel_name}」",
|
||||
)
|
||||
|
||||
@@ -770,6 +771,9 @@ def update_personnel(
|
||||
data = payload.model_dump(exclude_unset=True, exclude={"cert_list"})
|
||||
|
||||
effective_personnel_type = data.get("personnel_type", personnel.personnel_type)
|
||||
effective_personnel_affiliation = data.get(
|
||||
"personnel_affiliation", personnel.personnel_affiliation
|
||||
)
|
||||
effective_cert_rows = (
|
||||
cert_list
|
||||
if cert_list is not None
|
||||
@@ -780,6 +784,7 @@ def update_personnel(
|
||||
validate_personnel_required_certs(
|
||||
effective_cert_rows,
|
||||
effective_personnel_type,
|
||||
personnel_affiliation=effective_personnel_affiliation,
|
||||
subject_label=f"「{subject_name}」",
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user