Skip to content

Commit

Permalink
final tweaks following checking PR seek4science#1710
Browse files Browse the repository at this point in the history
  • Loading branch information
stuzart committed Jan 12, 2024
1 parent 49b6aed commit b4b5b5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/helpers/samples_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ def get_extra_info(sample)
}
end

# whether to attempt to show the extract samples button, the final check of whether there is a sample type will be done
# asynchronously
# whether to attempt to show the extract samples button,
# the final check of whether there is a sample type will be done asynchronously
def attempt_to_show_extract_samples_button?(asset, display_asset)
return false unless SampleType.any? && asset.can_manage? && asset.content_blob&.is_extractable_spreadsheet?
return false unless asset.extracted_samples.empty? && (display_asset.version == asset.version)
Expand All @@ -311,7 +311,7 @@ def attempt_to_show_extract_samples_button?(asset, display_asset)
!(asset.sample_extraction_task&.success? && Seek::Samples::Extractor.new(asset).fetch.present?)

rescue Seek::Samples::FetchException
true #allows to try again, the previous cached of results may be broken
true #allows to try again, the previous cached results may be broken
end

def show_sample_extraction_status?(data_file)
Expand Down
1 change: 0 additions & 1 deletion app/models/data_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def supports_spreadsheet_explore?
def matching_sample_type?
return false if external_asset.is_a? OpenbisExternalAsset

Rails.logger.debug("Checking for matching sample template for data file ##{id}")
possible_sample_types.any?
end

Expand Down

0 comments on commit b4b5b5b

Please sign in to comment.