fix tests by converting set to array

pull/10275/head
Christophe Bliard 3 years ago
parent 6b962c3605
commit 82cc6d6d2e
No known key found for this signature in database
GPG Key ID: 2BC07603210C3FA4
  1. 7
      app/models/activities/fetcher.rb

@ -48,7 +48,7 @@ module Activities
# Returns an array of available event types
def event_types
@event_types ||= begin
@event_types ||=
if @project
OpenProject::Activity.available_event_types.select do |o|
@project.self_and_descendants.detect do |_p|
@ -60,9 +60,8 @@ module Activities
end
end
else
OpenProject::Activity.available_event_types
OpenProject::Activity.available_event_types.to_a
end
end
end
# Returns an array of events for the given date range
@ -92,7 +91,7 @@ module Activities
# Resets the scope to the default scope
def default_scope!
@scope = OpenProject::Activity.default_event_types
@scope = OpenProject::Activity.default_event_types.to_a
end
def events_from_providers(from, to, limit)

Loading…
Cancel
Save