Ensure fallback to integer value if data does not exist

Correctly

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Roy Nieterau 2023-03-30 12:18:00 +02:00 committed by GitHub
parent 227b5620fb
commit 2e4fe5d7a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -484,8 +484,8 @@ def reset_framerange():
log.warning("No edit information found for %s" % asset_name)
return
handle_start = asset_data.get("handleStart")
handle_end = asset_data.get("handleEnd")
handle_start = asset_data.get("handleStart", 0)
handle_end = asset_data.get("handleEnd", 0)
frame_start -= int(handle_start)
frame_end += int(handle_end)

View file

@ -213,8 +213,8 @@ def get_frame_range() -> dict:
if frame_start is None or frame_end is None:
return
handle_start = asset["data"].get("handleStart")
handle_end = asset["data"].get("handleEnd")
handle_start = asset["data"].get("handleStart", 0)
handle_end = asset["data"].get("handleEnd", 0)
return {
"frameStart": frame_start,
"frameEnd": frame_end,