mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-07-26 18:17:30 +08:00
fix: skip Content-Type gate when request is None (#2843)
Legacy-UI batch flows invoke route handlers internally with request=None, which previously raised AttributeError on request.content_type. Signed-off-by: SAY-5 <say.apm35@gmail.com>
This commit is contained in:
@@ -116,6 +116,12 @@ class ContentTypeRejectionTest(unittest.TestCase):
|
||||
r = self._post({"Content-Type": "application/json"})
|
||||
self.assertEqual(r.status, 200)
|
||||
|
||||
def test_none_request_allowed(self):
|
||||
# Internal callers (e.g. legacy-UI batch flows) invoke route handlers
|
||||
# directly with request=None; helper must not raise AttributeError.
|
||||
# Regression test for issue #2843.
|
||||
self.assertIsNone(_reject_simple_form_content_type(None))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main(verbosity=2)
|
||||
|
||||
Reference in New Issue
Block a user