Closed
Bug 876527
Opened 12 years ago
Closed 12 years ago
Updating a Make clears all fields with no new data
Categories
(Webmaker Graveyard :: MakeAPI, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: cade, Assigned: cade)
References
Details
Attachments
(1 file)
If I try to update a make, and only pass in some of the fields, any omitted ones are deleted. This throws when they're required/fail validation, and some just get cleared entirely.
Assignee | ||
Comment 1•12 years ago
|
||
I modified updateFields in the make routes so that it doesn't overwrite existing fields with `null` and I also make it concatenate tag arrays. Also have it checking if the createdAt field already exists, so that the time is put in updatedAt if the make already existed.
Attachment #754821 -
Flags: review?(david.humphrey)
Assignee | ||
Updated•12 years ago
|
Summary: Updating a Make clears fields not trying to be updated → Updating a Make clears all fields with no new data
Comment 2•12 years ago
|
||
Comment on attachment 754821 [details] [review]
https://github.com/mozilla/MakeAPI/pull/62
r+ with nits in PR.
Attachment #754821 -
Flags: review?(david.humphrey) → review+
Comment 3•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/MakeAPI
https://github.com/mozilla/MakeAPI/commit/b1362b16b0816eeaa73d4a4dafc1bc41427a05b8
Fix Bug 876527 - Don't overwrite existing make fields on an update, concatenate tag arrays, and determine which date field to timestamp.
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in
before you can comment on or make changes to this bug.
Description
•