@@ -78,11 +78,13 @@ async def get_task_by_id(self, task_id: UUID) -> TaskResponse:
7878 # Extract participant and assignee names
7979 participant_name = None
8080 participant_email = None
81+ participant_role_id = None
8182 if task .participant :
8283 first_name = task .participant .first_name or ""
8384 last_name = task .participant .last_name or ""
8485 participant_name = f"{ first_name } { last_name } " .strip () or task .participant .email
8586 participant_email = task .participant .email
87+ participant_role_id = task .participant .role_id
8688
8789 assignee_name = None
8890 assignee_email = None
@@ -97,6 +99,7 @@ async def get_task_by_id(self, task_id: UUID) -> TaskResponse:
9799 ** {c .name : getattr (task , c .name ) for c in task .__table__ .columns },
98100 "participant_name" : participant_name ,
99101 "participant_email" : participant_email ,
102+ "participant_role_id" : participant_role_id ,
100103 "assignee_name" : assignee_name ,
101104 "assignee_email" : assignee_email ,
102105 }
@@ -151,14 +154,16 @@ async def get_all_tasks(
151154 # Build TaskResponse with participant and assignee names
152155 task_responses = []
153156 for task in tasks :
154- # Extract participant name and email if available
157+ # Extract participant name, email, and role_id if available
155158 participant_name = None
156159 participant_email = None
160+ participant_role_id = None
157161 if task .participant :
158162 first_name = task .participant .first_name or ""
159163 last_name = task .participant .last_name or ""
160164 participant_name = f"{ first_name } { last_name } " .strip () or task .participant .email
161165 participant_email = task .participant .email
166+ participant_role_id = task .participant .role_id
162167
163168 # Extract assignee name and email if available
164169 assignee_name = None
@@ -174,6 +179,7 @@ async def get_all_tasks(
174179 ** {c .name : getattr (task , c .name ) for c in task .__table__ .columns },
175180 "participant_name" : participant_name ,
176181 "participant_email" : participant_email ,
182+ "participant_role_id" : participant_role_id ,
177183 "assignee_name" : assignee_name ,
178184 "assignee_email" : assignee_email ,
179185 }
0 commit comments