From 3215452f85922f6ce78037ffe397a6afa8a774d0 Mon Sep 17 00:00:00 2001 From: 360dgries Date: Fri, 19 Jan 2024 10:44:20 -0500 Subject: [PATCH] Change to safe method call --- lib/inferno/apps/web/controllers/test_sessions/create.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inferno/apps/web/controllers/test_sessions/create.rb b/lib/inferno/apps/web/controllers/test_sessions/create.rb index 8871f5cb5..d271f6403 100644 --- a/lib/inferno/apps/web/controllers/test_sessions/create.rb +++ b/lib/inferno/apps/web/controllers/test_sessions/create.rb @@ -10,7 +10,7 @@ class Create < Controller def handle(req, res) params = req.params.to_h - if req.body.string.present? && req.env['CONTENT_TYPE'].include?('application/json') + if req.body.string.present? && req.env['CONTENT_TYPE']&.include?('application/json') params.merge!(JSON.parse(req.body.string).symbolize_keys) end