Skip to content

Commit

Permalink
annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
oma-s committed Jan 19, 2024
1 parent dd44211 commit a9752ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/models/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# id :uuid not null, primary key
# sprint_id :uuid
# title :string not null
# status :string
# status :citext
# github_id :string
# repository :string
# issue_number :bigint
Expand Down Expand Up @@ -45,7 +45,7 @@ def sync_with_github
end

Task.transaction do
Task.where(github_id: deleted_ids).where.not(status: "Done").destroy_all if deleted_ids.any?
Task.where(github_id: deleted_ids).where.not(status: "done").destroy_all if deleted_ids.any?

if tasks.any?
task_ids_by_github_id = Task.upsert_all(tasks, returning: [:github_id, :id], unique_by: [:github_id]).rows.to_h
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# id :uuid not null, primary key
# sprint_id :uuid
# title :string not null
# status :string
# status :citext
# github_id :string
# repository :string
# issue_number :bigint
Expand Down
2 changes: 1 addition & 1 deletion spec/models/task_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# id :uuid not null, primary key
# sprint_id :uuid
# title :string not null
# status :string
# status :citext
# github_id :string
# repository :string
# issue_number :bigint
Expand Down

0 comments on commit a9752ae

Please sign in to comment.