Skip to content

Commit

Permalink
[UPD] project_api : in task service read_group resolve lazy project_i…
Browse files Browse the repository at this point in the history
…d as well
  • Loading branch information
nayatec committed Oct 1, 2024
1 parent ebdd120 commit d9629f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions project_api/services/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,12 @@ def read_group(
group["stage_name"] = group.pop("stage_id")[1]._value
group["stage_name_count"] = group.pop("stage_id_count")
# TODO find a better way to resolve lazy value
fields_to_resolve = ("stage_id", "project_id")
for group in groups:
if "stage_id" in group:
group["stage_id"] = (group["stage_id"][0], group["stage_id"][1]._value)
for field in fields_to_resolve:
if field in group:
val = group[field]
group[field] = val and (val[0], val[1]._value)
return groups

def create(self, assignee_customer=None, **params):
Expand Down

0 comments on commit d9629f7

Please sign in to comment.