Fix type annotations

Fix obtaining events for tasks moved from private to public
Fix assert_exists() to return company_origin if requested
This commit is contained in:
allegroai
2021-01-05 16:27:38 +02:00
parent c67a56eb8d
commit 22e9c2b7eb
6 changed files with 59 additions and 46 deletions

View File

@@ -126,7 +126,9 @@ class TaskBLL(object):
return_dicts=False,
)
if only:
q = q.only(*only)
# Make sure to reset fields filters (some fields are excluded by default) since this
# is an internal call and specific fields were requested.
q = q.all_fields().only(*only)
if q.count() != len(ids):
raise errors.bad_request.InvalidTaskId(ids=task_ids)