mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
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:
parent
227b5620fb
commit
2e4fe5d7a5
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue