Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jcroteau/APPEALS-44282 - Fix Deprecation Warning: NOT conditions will no longer behave as NOR in Rails 6.1. (dev) #21472

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/jobs/quarterly_notifications_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ class QuarterlyNotificationsJob < CaseflowJob
def perform # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity
ensure_current_user_is_set

AppealState.where.not(
decision_mailed: true, appeal_cancelled: true
).find_in_batches(batch_size: QUERY_LIMIT.to_i) do |batched_appeal_states|
AppealState.where.not(decision_mailed: true).where.not(appeal_cancelled: true)
.find_in_batches(batch_size: QUERY_LIMIT.to_i) do |batched_appeal_states|
batched_appeal_states.each do |appeal_state|
# add_record_to_appeal_states_table(appeal_state.appeal)
if appeal_state.appeal_type == "Appeal"
Expand Down
5 changes: 4 additions & 1 deletion app/models/vbms_uploaded_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ class VbmsUploadedDocument < CaseflowRecord
attribute :file, :string

scope :successfully_uploaded, lambda {
where(error: nil).where.not(uploaded_to_vbms_at: nil, attempted_at: nil, processed_at: nil)
where(error: nil)
.where.not(uploaded_to_vbms_at: nil)
.where.not(attempted_at: nil)
.where.not(processed_at: nil)
}

def cache_file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def appeal_ids_for_completed_root_tasks
def appeal_ids_for_open_child_tasks
ETL::Task.select(:appeal_id).distinct
.where(appeal_type: "Appeal")
.where.not(task_type: "RootTask", task_status: Task.closed_statuses)
.where.not(task_type: "RootTask")
.where.not(task_status: Task.closed_statuses)
end
end
3 changes: 2 additions & 1 deletion app/queries/etl/unknown_status_with_open_root_task_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def appeal_ids_for_open_root_tasks
def appeal_ids_for_open_child_tasks
ETL::Task.select(:appeal_id).distinct
.where(appeal_type: "Appeal")
.where.not(task_type: "RootTask", task_status: Task.closed_statuses)
.where.not(task_type: "RootTask")
.where.not(task_status: Task.closed_statuses)
end
end
Loading