From 98467bdbf25f652699f6037fe5044b49c7298a25 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Wed, 2 Jul 2025 20:29:12 +0200 Subject: [PATCH] Fix minor issues --- app/controllers/settings/users_controller.rb | 3 +-- app/views/exports/index.html.erb | 2 +- app/views/imports/index.html.erb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/controllers/settings/users_controller.rb b/app/controllers/settings/users_controller.rb index d55a9aca..d8696617 100644 --- a/app/controllers/settings/users_controller.rb +++ b/app/controllers/settings/users_controller.rb @@ -94,8 +94,7 @@ class Settings::UsersController < ApplicationController archive_file.content_type == 'application/x-zip-compressed' || File.extname(archive_file.original_filename).downcase == '.zip' - redirect_to edit_user_registration_path, alert: 'Please upload a valid ZIP file.' - return + redirect_to edit_user_registration_path, alert: 'Please upload a valid ZIP file.' and return end end end diff --git a/app/views/exports/index.html.erb b/app/views/exports/index.html.erb index a53e9abb..25e94e5a 100644 --- a/app/views/exports/index.html.erb +++ b/app/views/exports/index.html.erb @@ -38,7 +38,7 @@ <% @exports.each do |export| %> <%= export.name %> - <%= number_to_human_size(export.file.byte_size) || 'N/A' %> + <%= number_to_human_size(export.file&.byte_size) || 'N/A' %> <%= human_datetime(export.created_at) %> <%= export.status %> diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb index f2b6467b..431ab51b 100644 --- a/app/views/imports/index.html.erb +++ b/app/views/imports/index.html.erb @@ -64,7 +64,7 @@   <%= link_to '📋', points_path(import_id: import.id) %> - <%= number_to_human_size(import.file.byte_size) || 'N/A' %> + <%= number_to_human_size(import.file&.byte_size) || 'N/A' %> <%= number_with_delimiter import.processed %>