From e622a7fb6f09866818af84503bde1ced2d7f065a Mon Sep 17 00:00:00 2001 From: Evan Blaudy Date: Fri, 13 Dec 2024 17:06:47 +0100 Subject: [PATCH] various improvements (#897) * [jwt][auth] when refreshing access_token unset from cookies the old refresh_token * [project] fix casting to float for fps Fix https://github.com/cgwire/zou/issues/896 --- zou/app/blueprints/auth/resources.py | 2 ++ zou/app/services/projects_service.py | 2 +- zou/app/services/shots_service.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zou/app/blueprints/auth/resources.py b/zou/app/blueprints/auth/resources.py index d2eb80c1e..37bc2fa7c 100644 --- a/zou/app/blueprints/auth/resources.py +++ b/zou/app/blueprints/auth/resources.py @@ -14,6 +14,7 @@ set_access_cookies, set_refresh_cookies, unset_jwt_cookies, + unset_refresh_cookies, get_jwt, ) @@ -388,6 +389,7 @@ def get(self): if is_from_browser(request.user_agent): response = jsonify({"refresh": True}) set_access_cookies(response, access_token) + unset_refresh_cookies(response) else: return {"access_token": access_token} diff --git a/zou/app/services/projects_service.py b/zou/app/services/projects_service.py index 99841b88b..fcb4cb764 100644 --- a/zou/app/services/projects_service.py +++ b/zou/app/services/projects_service.py @@ -678,7 +678,7 @@ def get_project_fps(project_id): Return fps set at project level or default fps if it not set. """ project = get_project(project_id) - return float(project["fps"] or "24.00") + return float(project["fps"] or "25.00") def get_task_type_priority_map(project_id, for_entity="Asset"): diff --git a/zou/app/services/shots_service.py b/zou/app/services/shots_service.py index ede6e6c10..1c0afed35 100644 --- a/zou/app/services/shots_service.py +++ b/zou/app/services/shots_service.py @@ -1663,7 +1663,7 @@ def set_frames_from_task_type_preview_files( project = projects_service.get_project(project_id) updates = [] for shot, preview_duration in results: - nb_frames = round(preview_duration * int(project["fps"])) + nb_frames = round(preview_duration * float(project["fps"])) updates.append( { "id": shot.id,