hammaster commited on
Commit
2fd47d8
·
1 Parent(s): 54660dc

fix: resolve NameError for return_mask in webhook handler

Browse files
Files changed (1) hide show
  1. api.py +2 -0
api.py CHANGED
@@ -256,6 +256,7 @@ async def webhook_handler(
256
  edge_radius: int = Form(2),
257
  threshold: Optional[float] = Form(None),
258
  soft_threshold: bool = Form(False),
 
259
  callback_url: Optional[str] = Form(None)
260
  ):
261
  """
@@ -284,6 +285,7 @@ async def webhook_handler(
284
  edge_radius = body.get("edge_radius", edge_radius)
285
  threshold = body.get("threshold", threshold)
286
  soft_threshold = body.get("soft_threshold", soft_threshold)
 
287
  callback_url = body.get("callback_url", callback_url)
288
  except Exception as e:
289
  logger.warning(f"Failed to parse JSON body: {e}")
 
256
  edge_radius: int = Form(2),
257
  threshold: Optional[float] = Form(None),
258
  soft_threshold: bool = Form(False),
259
+ return_mask: bool = Form(False),
260
  callback_url: Optional[str] = Form(None)
261
  ):
262
  """
 
285
  edge_radius = body.get("edge_radius", edge_radius)
286
  threshold = body.get("threshold", threshold)
287
  soft_threshold = body.get("soft_threshold", soft_threshold)
288
+ return_mask = body.get("return_mask", return_mask)
289
  callback_url = body.get("callback_url", callback_url)
290
  except Exception as e:
291
  logger.warning(f"Failed to parse JSON body: {e}")