toastdriven / restless

A lightweight REST miniframework for Python.
http://restless.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
832 stars 107 forks source link

FieldsPreparer raises KeyError on missing key in dict #123

Open adam0z opened 4 years ago

adam0z commented 4 years ago

How does FieldsPreparer catch missing keys? There is https://github.com/toastdriven/restless/blob/661593b7b43c42d1bc508dec795356297991255e/restless/preparers.py#L109 instead of

value = data.get(part)

so I get KeyError.

Should it be fixed?