You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attributes field should default to an empty object ({}) but it's blank. So if the attributes for an Interface object are unset, upon clicking "PUT" to update the instance, a 400 is raised from the browseable API:
PUT/api/sites/1/interfaces/foo14-ab01:s45/HTTP400BadRequest
Allow: GET,PUT,PATCH,DELETE,OPTIONSContent-Type: application/json
Vary: Accept{"error": {"message": {"attributes": "Expected dictionary but received <type 'NoneType'>"},"code": 400}}
Strangely despite the error, any update still succeeds (such as if you're updating the description field). Also, if one puts {} into the attributes field and submits with the "PUT" button, the operation succeeds without any error.
There's something fishy going on here and appears to be two issues:
The default value for the attributes field should be {} if the field is empty.
The validation of the attributes field appears to block only update to that field and not update to the entire object.
The text was updated successfully, but these errors were encountered:
The attributes field should default to an empty object (
{}
) but it's blank. So if the attributes for an Interface object are unset, upon clicking "PUT" to update the instance, a 400 is raised from the browseable API:Strangely despite the error, any update still succeeds (such as if you're updating the
description
field). Also, if one puts{}
into theattributes
field and submits with the "PUT" button, the operation succeeds without any error.There's something fishy going on here and appears to be two issues:
attributes
field should be{}
if the field is empty.The text was updated successfully, but these errors were encountered: