mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +08:00
Change any? to empty? [SCI-1665]
This commit is contained in:
parent
c8d2ae70fa
commit
cd0aba1896
2 changed files with 2 additions and 2 deletions
|
@ -201,7 +201,7 @@ class RepositoriesController < ApplicationController
|
|||
else
|
||||
@import_data = parsed_file.data
|
||||
|
||||
unless @import_data.header.any? && @import_data.columns.any?
|
||||
if @import_data.header.empty? || @import_data.columns.empty?
|
||||
return repository_response(t('teams.parse_sheet.errors.empty_file'))
|
||||
end
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class TeamsController < ApplicationController
|
|||
sheet = SpreadsheetParser.open_spreadsheet(params[:file])
|
||||
@header, @columns = SpreadsheetParser.first_two_rows(sheet)
|
||||
|
||||
unless @header.any? && @columns.any?
|
||||
if @header.empty? || @columns.empty?
|
||||
return parse_sheet_error(t('teams.parse_sheet.errors.empty_file'))
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue