mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 03:06:28 +08:00
Maintain decimal precision in "Number" column type for 0 inputs [SCI-10202]"
This commit is contained in:
parent
745c52a158
commit
0c2e279730
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ module RepositoryDatatable
|
|||
class RepositoryNumberValueSerializer < RepositoryBaseValueSerializer
|
||||
def value
|
||||
decimals = scope[:column].metadata.fetch('decimals', Constants::REPOSITORY_NUMBER_TYPE_DEFAULT_DECIMALS).to_i
|
||||
value_object.data.round(value_object.data.scale.zero? ? 0 : decimals).to_s
|
||||
value_object.data.round(decimals).to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue