Vote #74864
完了Project.activities returns different types depending on context
開始日:
2022/05/09
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
30
version_id:
75
issue_org_id:
15983
author_id:
74968
assigned_to_id:
1
comments:
1
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
Project.active_activities, Project.all_activities and, ultimately, Project.activities return:
- a database relation if the activities on the project are untouched (through TimeEntryActivity.shared.active)
- an Array if some activities are overridden (through Project.system_activities_and_project_overrides).
This makes any calling code unable to make further operations on the results, and leads to errors that are hard to understand.
journals
Fixed in r12854, it now always returns a ActiveRecord::Relation.
--------------------------------------------------------------------------------
いいね!0