eReuse / DeviceHubClient

GNU Affero General Public License v3.0
6 stars 2 forks source link

Create a ComputerMonitor using 'Add a device' form #61

Open JNadeu opened 3 years ago

JNadeu commented 3 years ago

Using the form to manually create a Device, more specifically the type ComputerMonitor, even if you fill in all the required fields of the form, you get an error when creating the device. Since for the type ComputerMonitor it is required to have the following fields as well: resolutionHeight, resolutionWidth, size.

Response error output when POST:

_{"code":422,"message":{"device":

{"resolutionHeight":["Missing data for required field."],

"resolutionWidth":["Missing data for required field."],

"size":["Missing data for required field."]}},

"type":"ValidationError"}_

Possible solution: Add three new fields (resolutionHeight, resolutionWidth, size) in the form when selecting the type of device equal to ComputerMonitor.