feat: Enhance ID mapping service robustness, add defensive guards, and expand migration engine and API testing.

This commit is contained in:
2026-02-25 14:44:21 +03:00
parent 33433c3173
commit 2a5b225800
11 changed files with 640 additions and 32 deletions

View File

@@ -101,11 +101,13 @@ class IdMappingService:
for res in resources:
res_uuid = res.get("uuid")
res_id = str(res.get("id")) # Store as string
raw_id = res.get("id")
res_name = res.get(name_field)
if not res_uuid or not res_id:
if not res_uuid or raw_id is None:
continue
res_id = str(raw_id) # Store as string
# Upsert Logic
mapping = self.db.query(ResourceMapping).filter_by(