From 00ab4f6d67b2d321c5b127de93edd5e883887262 Mon Sep 17 00:00:00 2001 From: Kikuo Emoto Date: Sun, 16 Oct 2022 02:01:16 +0900 Subject: [PATCH] fix(cdk-ops): NULL user_agent - Fixes the bug that `lambda/load-access-logs` crashed when `user_agent` was `NULL`. Replaces `NULL` with a dash (`-`). issue codemonger-io/codemonger#30 --- cdk-ops/lambda/load-access-logs/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdk-ops/lambda/load-access-logs/index.py b/cdk-ops/lambda/load-access-logs/index.py index 56d9eff..98bcfa1 100644 --- a/cdk-ops/lambda/load-access-logs/index.py +++ b/cdk-ops/lambda/load-access-logs/index.py @@ -203,7 +203,7 @@ def get_create_access_log_stage_table_statement() -> str: ' cs_uri_stem,', ' status,', " CASE WHEN referer IS NULL THEN '-' ELSE referer END,", - ' user_agent,', + " CASE WHEN user_agent IS NULL THEN '-' ELSE user_agent END,", ' cs_protocol,', ' cs_bytes,', ' time_taken,',