serJD commited on
Commit
ba5b40a
·
verified ·
1 Parent(s): 73151d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -192,7 +192,6 @@ def mainFunc(STREAM_ID, SOURCE_BRANCH, TARGET_BRANCH, UUID_COL, ATTR_METADATA, K
192
  @webhook_endpoint
193
  async def update_streams(request: Request):
194
  # Initialize flag
195
-
196
  should_continue = False
197
  finalBranchName = None
198
 
@@ -207,17 +206,15 @@ async def update_streams(request: Request):
207
 
208
  payload = payload["payload"]
209
 
 
210
  if payload.get('source') == 'notionTrigger':
211
  action = payload.get('action')
212
  streamName = payload.get('streamName')
213
  branchName = payload.get('branchName')
214
  update_source = "notionTrigger"
215
 
 
216
 
217
-
218
-
219
-
220
-
221
  else:
222
  # Check if the payload structure matches the expected format
223
  # Assuming payload["event"]["event_name"] gives you the event type
 
192
  @webhook_endpoint
193
  async def update_streams(request: Request):
194
  # Initialize flag
 
195
  should_continue = False
196
  finalBranchName = None
197
 
 
206
 
207
  payload = payload["payload"]
208
 
209
+ # webhook calls can come from different sources
210
  if payload.get('source') == 'notionTrigger':
211
  action = payload.get('action')
212
  streamName = payload.get('streamName')
213
  branchName = payload.get('branchName')
214
  update_source = "notionTrigger"
215
 
216
+ should_continue = True
217
 
 
 
 
 
218
  else:
219
  # Check if the payload structure matches the expected format
220
  # Assuming payload["event"]["event_name"] gives you the event type