gamechanger / mongothon

A lightweight Mongo object-document mapping abstraction layer over PyMongo
http://gamechanger.github.io/mongothon
MIT License
78 stars 19 forks source link

Model instance update errors out on multi-character keyword arguments #45

Closed inlinestyle closed 9 years ago

inlinestyle commented 9 years ago

A model instance update of the form

car = Car()
car.update(maker='porsche')

raises a ValueError due to a dangling comma in Document.update

See https://github.com/gamechanger/mongothon/blob/6c91cb3a652675fc0de6d679e6836643616b07ca/mongothon/document.py#L23

Single-character kwargs actually work fine since they get unpacked into a length-1 tuple.

inlinestyle commented 9 years ago

Merged fix, closing