16263: Assigns nil to select attributes when receiving empty values.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Thu, 19 Mar 2020 21:15:52 +0000 (18:15 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Thu, 19 Mar 2020 21:15:52 +0000 (18:15 -0300)
commitd45255b6af1ce80d640ecdb21c0af7aa0b95370f
tree075427759543466f7bb32bcdea5c4dcadd03f7d4
parentc1e8853d7cc587b606fdb74ac244540476e6620f
16263: Assigns nil to select attributes when receiving empty values.

Controller may translate NULL values to "" on certain object string fields.
The same with integers, NULLs are converted to 0.
When controller retrieves objects from railsAPI and uses the data to create
or update objects, some of those fields should get converted back to NULL.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>
services/api/app/controllers/application_controller.rb
services/api/app/controllers/arvados/v1/users_controller.rb
services/api/test/functional/arvados/v1/users_controller_test.rb