Skip to content

Commit

Permalink
Merge pull request #5676 from avalonmediasystem/no_managers
Browse files Browse the repository at this point in the history
Cast to arrays to avoid nils
  • Loading branch information
cjcolvar authored Sep 4, 2024
2 parents cb86a47 + 51c7e1f commit 9473f86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/presenters/admin/collection_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ def unpublished_media_object_count
end

def managers
@managers ||= document["edit_access_person_ssim"] & (document["collection_managers_ssim"] || [])
@managers ||= Array(document["edit_access_person_ssim"]) & Array(document["collection_managers_ssim"])
end

def editors
@editors ||= document["edit_access_person_ssim"] - managers
@editors ||= Array(document["edit_access_person_ssim"]) - managers
end

def depositors
document["read_access_person_ssim"]
Array(document["read_access_person_ssim"])
end

def manager_count
Expand Down

0 comments on commit 9473f86

Please sign in to comment.