Skip to content

Commit

Permalink
Safer genome updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Jan 10, 2024
1 parent 265307e commit d90a07e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/models/genome.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,11 @@ def miga_url
private

def standardize_source
self.source_accession.strip!
self.source_accession.gsub!(/,? and /, ',')
self.source_accession.gsub!(/( *, *)+/, ', ')
if source_accession
self.source_accession.strip!
self.source_accession.gsub!(/,? and /, ',')
self.source_accession.gsub!(/( *, *)+/, ', ')
end
self.source_json = nil unless source?
self.queue_for_source_update =
source_database_changed? || source_accession_changed?
Expand Down

0 comments on commit d90a07e

Please sign in to comment.