From 73347ba4192bdb41c39e12b716b05f289b688ab6 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 2 Aug 2024 11:17:53 +0200 Subject: [PATCH] Refactor timing variables check for None values Adjusted the check for None values in timing variables to ensure all required parameters are present before proceeding with calculations. --- client/ayon_resolve/api/lib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/ayon_resolve/api/lib.py b/client/ayon_resolve/api/lib.py index 89c559a9fa..58476e7900 100644 --- a/client/ayon_resolve/api/lib.py +++ b/client/ayon_resolve/api/lib.py @@ -282,7 +282,11 @@ def create_timeline_item( timeline = timeline or get_current_timeline() # timing variables - if all([timeline_in, source_start, source_end]): + if all([ + timeline_in is not None, + source_start is not None, + source_end is not None + ]): fps = timeline.GetSetting("timelineFrameRate") duration = source_end - source_start timecode_in = frames_to_timecode(timeline_in, fps)