Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Dec 1, 2023
1 parent f21f873 commit 0fa758a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/commands/training_data/code_tags_sample/update_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def call

private
def community_checked_by
return user if sample.status == :machine_tagged || sample.status == :human_tagged
return user if status == :community_checked

sample.community_checked_by
end

def admin_checked_by
return user if sample.status == :community_checked
return user if status == :admin_checked

sample.admin_checked_by
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TrainingData::CodeTagsSample::UpdateTagsTest < ActiveSupport::TestCase
tags = ['construct:if']
sample = create(:training_data_code_tags_sample, status:, locked_by: nil, locked_until: nil)

TrainingData::CodeTagsSample::UpdateTags.(sample, tags, :human_tagged, user)
TrainingData::CodeTagsSample::UpdateTags.(sample, tags, :community_checked, user)

assert_equal user, sample.community_checked_by
assert_nil sample.admin_checked_by
Expand Down

0 comments on commit 0fa758a

Please sign in to comment.