From efdc1e81b7c06ae51df230639d917330e3093e58 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 31 Oct 2014 15:07:13 +0100 Subject: [PATCH] Use JSON serialization to store attribute values in migration script --- portail_citoyen/management/commands/export-for-authentic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/portail_citoyen/management/commands/export-for-authentic.py b/portail_citoyen/management/commands/export-for-authentic.py index ec76c2a..4043cbb 100644 --- a/portail_citoyen/management/commands/export-for-authentic.py +++ b/portail_citoyen/management/commands/export-for-authentic.py @@ -1,6 +1,7 @@ import sys import locale import logging +import json from django.contrib.auth.models import User, Group from django.contrib.auth import get_user_model @@ -113,7 +114,7 @@ class Command(BaseCommand): required=required) av = AttributeValue( attribute=attributes[field.attname], - content=value) + content=json.dumps(value)) av.owner = new_user attribute_values.append(av) for attribute in attributes.values():