samuraisam / django-json-rpc

JSON-RPC Implementation for Django
MIT License
286 stars 83 forks source link

Fix for tuple return, use any instead of sum #81

Closed CGenie closed 8 years ago

CGenie commented 8 years ago

Tests added for tuple return

Either way this was wrong when tuple was returned from within the rpc function: the TypeError had a tuple for %r formatting which was wrong and resulted in uncomprehensible error:

https://github.com/samuraisam/django-json-rpc/blob/master/jsonrpc/site.py#L225

The behavior of converting tuple to list is consistent with what json-rpc does (https://pypi.python.org/pypi/json-rpc/).

samuraisam commented 8 years ago

This is awesome, thanks for the fix!