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)

x86
macOS
defect
Not set
normal

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.
Blocks: 871700
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)
Summary: Updating a Make clears fields not trying to be updated → Updating a Make clears all fields with no new data
Attachment #754821 - Flags: review?(david.humphrey) → review+
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.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: