It's impossible to modify a field resource that is a link to another object

Bug #431986 reported by Leonard Richardson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Fix Released
Undecided
Unassigned

Bug Description

To navigate to a field resource you must use the internal name of the field. For instance, a bug assignee is "assignee", not "assignee_link". This is incorrect. lazr.restful should accept "assignee_link" all the time and never accept "assignee".

Not only is the current behavior inconsistent, it makes it impossible to modify field resources that are links to other objects. The traversal code expects "assignee" and the modification code expects "assignee_link". So if you PATCH /firefox/+bug/15/assignee you get a 500 error: lazr.restful says "I can't set a value for a nonexistent field 'assignee'" If you PATCH /firefox/+bug/15/assignee_link you get a 404 error.

Related branches

Changed in lazr.restful:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.