Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

use self_link helper in WeekDayRepresenter

Christophe Bliard0ab1b8b8f5f6
diff --git a/lib/api/v3/days/week_day_representer.rb b/lib/api/v3/days/week_day_representer.rb
index 45f2f90a2d3..a1ec01d0ef9 100644
--- a/lib/api/v3/days/week_day_representer.rb
+++ b/lib/api/v3/days/week_day_representer.rb
@@ -30,16 +30,11 @@ module API::V3::Days
class WeekDayRepresenter < ::API::Decorators::Single
include ::API::Caching::CachedRepresenter
- property :day, render_nil: true
- property :name, render_nil: true
+ property :day
+ property :name
property :working
- link :self do
- {
- href: api_v3_paths.days_week_day(represented.day),
- title: represented.name
- }
- end
+ self_link path: :days_week_day, id_attribute: :day
def _type
'WeekDay'