Skip to content

Commit

Permalink
[Hotfix] Fix issue with errors on flagged apps page DAH-853 (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
akegan authored Jun 15, 2021
1 parent d157df5 commit b123921
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/services/force/flagged_record_set_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class FlaggedRecordSetService < Force::Base
# marked duplicates - already marked, can unmark if needed :)

def pending_review_record_sets
listing_ids = listing_ids_user_can_access
listing_ids = active_listing_ids_user_can_access
if @user.admin?
result = parsed_index_query(%(
SELECT #{query_fields(:pending_review)} FROM Flagged_Record_Set__c
Expand All @@ -32,7 +32,7 @@ def pending_review_record_sets
end

def marked_duplicate_record_sets
listing_ids = listing_ids_user_can_access
listing_ids = active_listing_ids_user_can_access
result = parsed_index_query(%(
SELECT #{query_fields(:marked_duplicate)} FROM Flagged_Record_Set__c
WHERE Listing__c in ('#{listing_ids.join("', '")}')
Expand Down Expand Up @@ -84,9 +84,10 @@ def flagged_applications_fields

private

def listing_ids_user_can_access
def active_listing_ids_user_can_access
parsed_index_query(%(
SELECT Id FROM Listing__c
SELECT Id, Status__c FROM Listing__c
WHERE Status__c in ('Active', 'Lease Up')
)).map(&:Id)
end
end
Expand Down

0 comments on commit b123921

Please sign in to comment.