Update app.py
Browse files
app.py
CHANGED
|
@@ -163,7 +163,7 @@ async def create_task(request: Request):
|
|
| 163 |
"assignees": [int(uid) for uid in assignee_ids],
|
| 164 |
"status": status
|
| 165 |
}
|
| 166 |
-
|
| 167 |
# ➕ Add due date if provided
|
| 168 |
if deadline:
|
| 169 |
try:
|
|
@@ -172,7 +172,8 @@ async def create_task(request: Request):
|
|
| 172 |
print(f"📅 Due Date (timestamp): {due_timestamp}")
|
| 173 |
except ValueError:
|
| 174 |
print("❌ Invalid deadline format. Skipping due_date.")
|
| 175 |
-
|
|
|
|
| 176 |
# 🔁 Update the task with assignees and due date
|
| 177 |
update_url = f"{CLICKUP_URL_BASE}/task/{new_task_id}"
|
| 178 |
update_response = requests.put(update_url, headers=headers, json=update_payload)
|
|
|
|
| 163 |
"assignees": [int(uid) for uid in assignee_ids],
|
| 164 |
"status": status
|
| 165 |
}
|
| 166 |
+
|
| 167 |
# ➕ Add due date if provided
|
| 168 |
if deadline:
|
| 169 |
try:
|
|
|
|
| 172 |
print(f"📅 Due Date (timestamp): {due_timestamp}")
|
| 173 |
except ValueError:
|
| 174 |
print("❌ Invalid deadline format. Skipping due_date.")
|
| 175 |
+
|
| 176 |
+
print(f"Update payload is {update_payload}\n")
|
| 177 |
# 🔁 Update the task with assignees and due date
|
| 178 |
update_url = f"{CLICKUP_URL_BASE}/task/{new_task_id}"
|
| 179 |
update_response = requests.put(update_url, headers=headers, json=update_payload)
|