mysociety / popit-api

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
17 stars 3 forks source link

Cast incoming image ids to ObjectIds #138

Closed chrismytton closed 9 years ago

chrismytton commented 9 years ago

When PUTing an update to a record the id field of each object in the images array should be cast to a mongo ObjectId if present.

Fixes https://github.com/mysociety/popit/issues/794

struan commented 9 years ago

Looks fine.

I worry slightly if they include an ID that isn't actually an ObjectID thing but that was an issue previously too so probably not worth getting too fussed about.