Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(tasks): share with team (#3484)

Will Hutchinsonab03ccad5368
diff --git a/a.out b/a.out
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/rust/cloud-storage/documents/src/domain/service.rs b/rust/cloud-storage/documents/src/domain/service.rs
index e153ca42eb..1fb9cc6d7f 100644
--- a/rust/cloud-storage/documents/src/domain/service.rs
+++ b/rust/cloud-storage/documents/src/domain/service.rs
@@ -1236,13 +1236,9 @@ impl<
document_id: &str,
request: &CreateTaskRequest,
) -> Result<(), DocumentError> {
- if request.share_with_team {
- let Some(team_id) = request.team_id else {
- return Err(DocumentError::BadRequest(
- "teamId is required to share a task with a team".to_string(),
- ));
- };
-
+ if request.share_with_team
+ && let Some(team_id) = request.team_id
+ {
let _ = self
.repo
.share_with_team(&team_id, document_id)