From 4b8721ca1c736d59fa398fedd8682f63438de090 Mon Sep 17 00:00:00 2001
From: Christopher Rhodes <christopher.rhodes@embl.de>
Date: Tue, 7 May 2024 15:29:48 +0200
Subject: [PATCH] Allow None to certain int parameters

---
 model_server/base/roiset.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/model_server/base/roiset.py b/model_server/base/roiset.py
index d289284f..28c1ce2d 100644
--- a/model_server/base/roiset.py
+++ b/model_server/base/roiset.py
@@ -30,13 +30,13 @@ class PatchParams(BaseModel):
     focus_metric: str = 'max_sobel'
     rgb_overlay_channels: Union[List[Union[int, None]], None] = None
     rgb_overlay_weights: List[float] = [1.0, 1.0, 1.0]
-    pad_to: int = 256
+    pad_to: Union[int, None] = 256
     expanded: bool = False
 
 
 class AnnotatedZStackParams(BaseModel):
     draw_label: bool = False
-    channel: int = None
+    channel: Union[int, None] = None
 
 
 class RoiFilterRange(BaseModel):
-- 
GitLab