Skip to content

Commit

Permalink
Fix type check before removing file in main_func
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Jan 29, 2025
1 parent 89fb96c commit a790e50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def main_func(user_id: int, team: TeamInfo, workspace: WorkspaceInfo, project: P
total_updated = sum(len(lst) for lst in updated_images.values())
if total_updated == 0 and not is_meta_changed:
sly.logger.log(g._INFO, "Nothing to update. Skipping stats calculation...")
g.api.file.remove(team.id, active_project_path_tf)
if isinstance(active_project_path_tf, str):
g.api.file.remove(team.id, active_project_path_tf)
u.add_heatmaps_status_ok(team, tf_project_dir, project_fs_dir)
return JSONResponse({"message": "Nothing to update. Skipping stats calculation..."})

Expand Down

0 comments on commit a790e50

Please sign in to comment.