Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -175,12 +175,14 @@ def sync_to_notion(token, database_id, branch_data):
|
|
175 |
status_messages = branch.get("status-message", [])
|
176 |
status_message_data = [{"name": sm} for sm in status_messages]
|
177 |
|
|
|
|
|
178 |
page_data = {
|
179 |
"properties": {
|
180 |
"Name": {"title": [{"text": {"content": branch['Name']}}]},
|
181 |
"status-tag": {"select": {"name": status_tag}}, # Assuming 'select' type
|
182 |
"status": {"rich_text": [{"text": {"content": "Status: " + status_tag}}]},
|
183 |
-
"url": {"url":
|
184 |
"updated": {"date": {"start": updated_isoformat}},
|
185 |
"description": {"rich_text": [{"text": {"content": str(branch.get("description", ""))}}]},
|
186 |
"sub-variant": {"rich_text": [{"text": {"content": branch.get("sub-variant", "")}}]},
|
@@ -190,6 +192,8 @@ def sync_to_notion(token, database_id, branch_data):
|
|
190 |
"status-message": {"multi_select": status_message_data}
|
191 |
}
|
192 |
}
|
|
|
|
|
193 |
|
194 |
# Update an existing page or create a new one
|
195 |
if page_id:
|
|
|
175 |
status_messages = branch.get("status-message", [])
|
176 |
status_message_data = [{"name": sm} for sm in status_messages]
|
177 |
|
178 |
+
url_clean = branch.get("url", "")
|
179 |
+
url_clean = url_clean.replace("xyz//","xyz/")
|
180 |
page_data = {
|
181 |
"properties": {
|
182 |
"Name": {"title": [{"text": {"content": branch['Name']}}]},
|
183 |
"status-tag": {"select": {"name": status_tag}}, # Assuming 'select' type
|
184 |
"status": {"rich_text": [{"text": {"content": "Status: " + status_tag}}]},
|
185 |
+
"url": {"url": url_clean},
|
186 |
"updated": {"date": {"start": updated_isoformat}},
|
187 |
"description": {"rich_text": [{"text": {"content": str(branch.get("description", ""))}}]},
|
188 |
"sub-variant": {"rich_text": [{"text": {"content": branch.get("sub-variant", "")}}]},
|
|
|
192 |
"status-message": {"multi_select": status_message_data}
|
193 |
}
|
194 |
}
|
195 |
+
|
196 |
+
|
197 |
|
198 |
# Update an existing page or create a new one
|
199 |
if page_id:
|