mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 02:46:53 +00:00
Optimize tasks.move
This commit is contained in:
parent
77e7fb5c13
commit
073cc96fb8
@ -1478,10 +1478,11 @@ def move(call: APICall, company_id: str, request: MoveRequest):
|
|||||||
"project or project_name is required"
|
"project or project_name is required"
|
||||||
)
|
)
|
||||||
|
|
||||||
_assert_writable_tasks(company_id, call.identity, request.ids)
|
tasks = _assert_writable_tasks(
|
||||||
updated_projects = set(
|
company_id, call.identity, request.ids, only=("id", "project")
|
||||||
t.project for t in Task.objects(id__in=request.ids).only("project") if t.project
|
|
||||||
)
|
)
|
||||||
|
updated_projects = set(t.project for t in tasks if t.project)
|
||||||
|
|
||||||
project_id = project_bll.move_under_project(
|
project_id = project_bll.move_under_project(
|
||||||
entity_cls=Task,
|
entity_cls=Task,
|
||||||
user=call.identity.user,
|
user=call.identity.user,
|
||||||
|
Loading…
Reference in New Issue
Block a user