Skip to content

Commit cce1245

Browse files
committed
refactor(project_management): when fetching project tickets, add new url to metadata
ref:
1 parent 173ab71 commit cce1245

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/core/viewsets/ticket.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ def get_meta_urls(self) -> dict[ str ] | dict[ str, dict[str] ]:
288288
_meta_urls = super().get_meta_urls()
289289

290290
if 'sub_models' in _meta_urls:
291-
del _meta_urls['sub_models']['projecttaskticket']
291+
292+
if 'project_id' not in self.kwargs:
293+
del _meta_urls['sub_models']['projecttaskticket']
294+
295+
if 'project_id' in self.kwargs:
296+
_meta_urls['new'] = _meta_urls['sub_models']['projecttaskticket']['url']
292297

293298
return self._meta_urls
294299

0 commit comments

Comments
 (0)