Commit 8bd5d86360e87dc18e9d79caa982594eff688459

Fix correct way of handling query string arguments
  • Diff rendering mode:
  • inline
  • side by side

swtr.py

191 reponse.status_code = 400191 reponse.status_code = 400
192 return response192 return response
193193
194 res = g.collection.find(args)
194 params = {}
195
196 params['where'] = args.get('where')
197 if args.get('who'):
198 params['who'] = args.get('who')
199 if args.get('what'):
200 params['what'] = args.get('what')
201 if args.get('how'):
202 params['how'] = args.get('how')
203
204 res = g.collection.find(params)
195205
196 if res.count() < 1:206 if res.count() < 1:
197 response.status_code = 404207 response.status_code = 404