@@ -651,11 +651,11 @@ async def _list_all_groupedjobs(self) -> list[K8sObjectData]:
651651 # label_name is value of grouped job label
652652 label_value = job .metadata .labels [label_name ]
653653 group_key = f"{ label_name } ={ label_value } "
654- # Store lightweight job info only
655654 lightweight_job = LightweightJobInfo (
656655 name = job .metadata .name ,
657656 namespace = job .metadata .namespace
658657 )
658+ # Store lightweight job info only for grouped jobs
659659 grouped_jobs [group_key ].append (lightweight_job )
660660 # Keep only ONE full job as template per group
661661 if group_key not in grouped_jobs_template :
@@ -673,10 +673,8 @@ async def _list_all_groupedjobs(self) -> list[K8sObjectData]:
673673
674674 result = []
675675 for group_name , jobs in grouped_jobs .items ():
676- # Get the one template job for this group
677676 template_job = grouped_jobs_template [group_name ]
678677
679- # Group lightweight jobs by namespace
680678 jobs_by_namespace = defaultdict (list )
681679 for job in jobs :
682680 jobs_by_namespace [job .namespace ].append (job )
@@ -704,7 +702,6 @@ async def _list_all_groupedjobs(self) -> list[K8sObjectData]:
704702
705703 grouped_job .name = group_name
706704 grouped_job .namespace = namespace
707- # Store only lightweight job info
708705 grouped_job ._api_resource ._grouped_jobs = limited_jobs
709706 grouped_job ._api_resource ._label_filter = group_name
710707
0 commit comments