chore: fix sync_team_members - gracefully handle empty team members with get() default
This commit is contained in:
parent
95047f3c33
commit
5005af628c
2 changed files with 5 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Service Factory — ERPNext Custom App Project
|
||||
|
||||
> **Current Version: V0.1.0028** — Each completed prompt/step increments the patch number by 1 (V0.1.0000 → V0.1.0001 → V0.1.0002…). The agent automatically commits and pushes after every step.
|
||||
> **Current Version: V0.1.0029** — Each completed prompt/step increments the patch number by 1 (V0.1.0000 → V0.1.0001 → V0.1.0002…). The agent automatically commits and pushes after every step.
|
||||
|
||||
## Project Overview
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,10 @@ class EngagementCard(Document):
|
|||
return
|
||||
|
||||
self.set("assignments", [])
|
||||
for member in team_row.members:
|
||||
members = team_row.get("members", [])
|
||||
if not members:
|
||||
return
|
||||
for member in members:
|
||||
row = self.append("assignments", {})
|
||||
row.employee = member.employee
|
||||
row.role = member.role
|
||||
|
|
|
|||
Loading…
Reference in a new issue