From b81709c82106fe23a75fbc9857b4169ccfa07969 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 26 Jul 2024 12:54:40 +0200 Subject: [PATCH] Convert id to int --- src/collective/feedback/restapi/services/update.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/collective/feedback/restapi/services/update.py b/src/collective/feedback/restapi/services/update.py index 001a07b..5ba26f1 100644 --- a/src/collective/feedback/restapi/services/update.py +++ b/src/collective/feedback/restapi/services/update.py @@ -30,7 +30,10 @@ def reply(self): tool = getUtility(ICollectiveFeedbackStore) if self.params: - id = self.params[0] + try: + id = int(self.params[0]) + except ValueError: + raise BadRequest(f"Bad id={self.params[0]} format provided") comment = tool.get(id)