Skip to content
Snippets Groups Projects
Verified Commit be168c5a authored by ynerant's avatar ynerant
Browse files

Decimal value is serialized as a str value


Signed-off-by: ynerant's avatarYohann D'ANELLO <ynerant@crans.org>
parent b46ae6f8
No related branches found
No related tags found
1 merge request!162Bugs mineurs, documentation
Pipeline #8901 passed with stages
in 9 minutes and 56 seconds
......@@ -3,6 +3,7 @@
import json
from datetime import datetime, date
from decimal import Decimal
from urllib.parse import quote_plus
from warnings import warn
......@@ -152,6 +153,8 @@ class TestAPI(TestCase):
value = value.isoformat()
elif isinstance(value, ImageFieldFile):
value = value.name
elif isinstance(value, Decimal):
value = str(value)
query = json.dumps({field.name: value})
# Create sample permission
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment