serJD commited on
Commit
7a0a544
·
1 Parent(s): da750c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -128,10 +128,11 @@ def sync_to_notion(token, database_id, branch_data):
128
  # Prepare data for updating or creating a page
129
  print (branch.get("url", ""))
130
  updated_value = branch.get("updated")
131
- if isinstance(updated_value, datetime):
 
132
  updated_isoformat = updated_value.isoformat()
133
  else:
134
- updated_isoformat = datetime.now().isoformat()
135
 
136
  page_data = {
137
  "properties": {
 
128
  # Prepare data for updating or creating a page
129
  print (branch.get("url", ""))
130
  updated_value = branch.get("updated")
131
+
132
+ if isinstance(updated_value, datetime.datetime): # Use datetime.datetime here
133
  updated_isoformat = updated_value.isoformat()
134
  else:
135
+ updated_isoformat = datetime.datetime.now().isoformat() # Use datetime.datetime.now() here
136
 
137
  page_data = {
138
  "properties": {