mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Add a duration setter that now exists
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user