From 3733b17e98a98511760f80335194a6bc3bd6f453 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 19 Dec 2024 12:51:26 +0100 Subject: [PATCH] remove shortcut, better to pass it properly through json_encode --- lilya/responses.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lilya/responses.py b/lilya/responses.py index fc6939c..8c4d46b 100644 --- a/lilya/responses.py +++ b/lilya/responses.py @@ -103,8 +103,7 @@ def make_response(self, content: Any) -> bytes | memoryview: """ Makes the Response object type. """ - # only handle empty string not empty bytes. Bytes are handled later - if content is None or content is NoReturn or content == "": + if content is None or content is NoReturn: return b"" if isinstance(content, (bytes, memoryview)): return content