From 36afb47402573133a67c43e1e0c5b861ba34c024 Mon Sep 17 00:00:00 2001 From: mdk-man <73103726+mdk-man@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:07:32 +0200 Subject: [PATCH] handle meta update when key is present but its value is None --- gazu/shot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gazu/shot.py b/gazu/shot.py index 8579e036..a5369cf3 100644 --- a/gazu/shot.py +++ b/gazu/shot.py @@ -404,7 +404,8 @@ def update_shot_data(shot, data={}, client=default): """ shot = normalize_model_parameter(shot) current_shot = get_shot(shot["id"], client=client) - updated_shot = {"id": current_shot["id"], "data": current_shot["data"]} + current_data = current_shot["data"] if current_shot["data"] is not None else {} + updated_shot = {"id": current_shot["id"], "data": current_data} updated_shot["data"].update(data) return update_shot(updated_shot, client=client)