Permalink
Browse files

Merge branch 'release/1.9.9'

  • Loading branch information...
2 parents 712a353 + 4d8a118 commit 2b7db7e7bfe66d8ab4c8d45d064579aeba22d2ee @klen committed Oct 3, 2012
Showing with 5 additions and 9 deletions.
  1. +1 −1 Changelog
  2. +1 −1 adrest/__init__.py
  3. +1 −5 adrest/utils/serializer.py
  4. +2 −2 tests/main/tests.py
View
@@ -1,4 +1,4 @@
-2012-10-03 klen 1.9.8
+2012-10-03 klen 1.9.9
* Fix access logging
View
@@ -1,4 +1,4 @@
-version_info = (1, 9, 8)
+version_info = (1, 9, 9)
__version__ = version = '.'.join(map(str, version_info))
__project__ = PROJECT = __name__
@@ -1,6 +1,5 @@
import abc
import collections
-import numbers
from datetime import datetime, date, time
from decimal import Decimal
@@ -41,9 +40,6 @@ def to_simple(self, value, **options):
if isinstance(value, Decimal):
return float(str(value))
- if isinstance(value, numbers.Number):
- return value
-
if isinstance(value, (datetime, date, time)):
return self.to_simple_datetime(value)
@@ -65,7 +61,7 @@ def to_simple(self, value, **options):
if isinstance(value, Model):
return self.to_simple_model(value, **options)
- return smart_unicode(value)
+ return value
@staticmethod
def to_simple_datetime(value):
View
@@ -37,8 +37,8 @@ def get(self, request):
response = test.dispatch(request)
self.assertContains(response, 'test')
- content = emitter.JSONSerializer().serialize([1, Decimal('3.4')])
- self.assertEqual(content, '[1, 3.4]')
+ content = emitter.JSONSerializer().serialize([1, Decimal('3.4'), None])
+ self.assertTrue('3.' in content and 'null' in content)
class MetaTest(TestCase):

0 comments on commit 2b7db7e

Please sign in to comment.