From 7841f17824d2844f6698bfbca360d385a5aea520 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 31 Jul 2024 11:40:04 +0200 Subject: [PATCH] fix logics --- src/collective/feedback/restapi/services/get.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/collective/feedback/restapi/services/get.py b/src/collective/feedback/restapi/services/get.py index ae6b60d..17a79b4 100644 --- a/src/collective/feedback/restapi/services/get.py +++ b/src/collective/feedback/restapi/services/get.py @@ -193,9 +193,11 @@ def get_data(self): # Use has_unread filter if has_undread is not None: - has_undread = not (has_undread == "false") and has_undread == "true" - if feedback["has_unread"] != has_undread: - pages_to_remove.append(uid) + if has_undread in ("true", "false"): + has_undread = not (has_undread == "false") and has_undread == "true" + + if feedback["has_unread"] != has_undread: + pages_to_remove.append(uid) for uid in pages_to_remove: del feedbacks[uid]