Skip to content

Commit

Permalink
various improvements (#897)
Browse files Browse the repository at this point in the history
* [jwt][auth] when refreshing access_token unset from cookies the old refresh_token

* [project] fix casting to float for fps
Fix #896
  • Loading branch information
EvanBldy authored Dec 13, 2024
1 parent 518ec96 commit e622a7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions zou/app/blueprints/auth/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
set_access_cookies,
set_refresh_cookies,
unset_jwt_cookies,
unset_refresh_cookies,
get_jwt,
)

Expand Down Expand Up @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion zou/app/services/projects_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
2 changes: 1 addition & 1 deletion zou/app/services/shots_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e622a7f

Please sign in to comment.