Add a duration setter that now exists

This commit is contained in:
Oliver Günther
2026-04-15 10:54:14 +02:00
parent f4f167bbb2
commit e820cd0bee
@@ -109,10 +109,13 @@ module API
property :duration,
exec_context: :decorator,
getter: ->(*) do
datetime_formatter.format_duration_from_hours(represented.duration)
end
render_nil: true,
getter: ->(*) {
datetime_formatter.format_duration_from_hours(represented.duration, allow_nil: true)
},
setter: ->(fragment:, **) {
represented.duration = datetime_formatter.parse_duration_to_hours(fragment, "duration", allow_nil: true)
}
property :state
property :sharing