Skip to content

Commit

Permalink
More bugfixes to the background jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Apr 25, 2024
1 parent fbe5662 commit 6343e46
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions server/app/lib/importer/disease_ontology_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def url_from_doid(doid)
def add_flags(disease, text)
civicbot_user = User.find(385)
(disease.evidence_items + disease.assertions).each do |obj|
if obj.flags.select{|f| f.state == 'open' && f.open_activity.note == text && c.open_activity.user_id == 385}.count == 0
Activity::FlagEntity.new(
if obj.flags.select{|f| f.state == 'open' && f.open_activity.note == text && f.open_activity.user_id == 385}.count == 0
Activities::FlagEntity.new(
flagging_user: civicbot_user,
flaggable: obj,
organization_id: nil,
Expand Down
6 changes: 3 additions & 3 deletions server/app/lib/importer/sequence_ontology_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def process_obsolete_terms
text += " Replaced by #{term['replaced_by']}."
end
obsolete_type.variants.each do |variant|
if variant.flags.select{|f| f.state == 'open' && f.comments.select{|c| c.text =~ /obsolete Sequence Ontology term/ && c.user_id == 385}.count > 0}.count == 0
Actions::FlagEntity.new(
if variant.flags.select{|f| f.state == 'open' && f.open_activity.note =~ /obsolete Sequence Ontology term/ && f.open_activity.user_id == 385}.count == 0
Activities::FlagEntity.new(
flagging_user: civicbot_user,
flaggable: variant,
organization_id: nil,
comment: text
note: text
).perform
end
end
Expand Down
2 changes: 1 addition & 1 deletion server/app/lib/scrapers/human_phenotype_ontology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def self.update
civicbot_user = User.find(385)
(p.evidence_items + p.assertions).each do |obj|
if obj.flags.select{|f| f.state == 'open' && f.open_activity.note =~ /deprecated HPO term/ && f.open_activity.user_id == 385}.count == 0
Activity::FlagEntity.new(
Activities::FlagEntity.new(
flagging_user: civicbot_user,
flaggable: obj,
organization_id: nil,
Expand Down

0 comments on commit 6343e46

Please sign in to comment.