Friday, May 26, 2017

Re: Django 1.11: JSONField loaded as string during migration's RunPython

This was a problem generated by django-jsonfield v1.0.1

CLOSED.

El jueves, 25 de mayo de 2017, 16:15:07 (UTC-3), hector...@unholster.com escribió:
Hello,

We are moving to Django 1.11, but we have some models with JSONField fields, which are being used on some custom migration functions (called with RunPython). We're getting the following kind of errors:

    _ForecastType = apps.get_model('forecast', 'forecasttype')
    for forecast_type in _ForecastType.objects.all():
>     hours = forecast_type.params['reception_hours']
E     TypeError: string indices must be integers

so Django is not properly loading the field during the migration. What should we do to fix it?

Thanks very much for any help,
Hector.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/84622e92-f5e9-4421-8d0c-4da5ec982496%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment