Update app.py
Browse files
app.py
CHANGED
|
@@ -156,7 +156,10 @@ async def create_task(request: Request):
|
|
| 156 |
if response.ok:
|
| 157 |
new_task = response.json()
|
| 158 |
new_task_id = new_task.get("id")
|
|
|
|
|
|
|
| 159 |
print("✅ Task created from template:", new_task_id)
|
|
|
|
| 160 |
|
| 161 |
# ➕ Prepare the update payload to add the assignee and duedate to the created task from template
|
| 162 |
update_payload = {
|
|
@@ -196,7 +199,7 @@ async def create_task(request: Request):
|
|
| 196 |
params = {
|
| 197 |
"mode": "notify-assigned",
|
| 198 |
"assigneeId": assignee_id,
|
| 199 |
-
"spaceId":
|
| 200 |
}
|
| 201 |
|
| 202 |
response = requests.get(web_app_url, params=params)
|
|
|
|
| 156 |
if response.ok:
|
| 157 |
new_task = response.json()
|
| 158 |
new_task_id = new_task.get("id")
|
| 159 |
+
space_id = new_task.get("space", {}).get("id")
|
| 160 |
+
|
| 161 |
print("✅ Task created from template:", new_task_id)
|
| 162 |
+
print(f"Space id is {space_id")
|
| 163 |
|
| 164 |
# ➕ Prepare the update payload to add the assignee and duedate to the created task from template
|
| 165 |
update_payload = {
|
|
|
|
| 199 |
params = {
|
| 200 |
"mode": "notify-assigned",
|
| 201 |
"assigneeId": assignee_id,
|
| 202 |
+
"spaceId": space_id
|
| 203 |
}
|
| 204 |
|
| 205 |
response = requests.get(web_app_url, params=params)
|