Open MikkoJo opened 12 years ago
This happens if features properties is empty object and collection also has features with properties.
Cleaned traceback below
TypeError at /admin/geojson_rest/pointfeature/
string indices must be integers
Environment:
Request Method: POST Request URL: https://....../admin/geojson_rest/pointfeature/
Django Version: 1.4.2 Python Version: 2.6.6 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.gis', 'base_page', 'dashboard', 'maps', 'auth_page', 'plan_proposals', 'geonition_client', 'gntauth', 'gntimages', 'geojson_rest', 'geonition_utils', 'geoforms', 'manage_release', 'statics', 'modeltranslation') Installed Middleware: ('django.middleware.gzip.GZipMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'geonition_utils.middleware.PreventCacheMiddleware', 'geonition_utils.middleware.IEEdgeMiddleware')
Traceback: File "/l/apps/softgis/geonition28.env/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
Exception Type: TypeError at /admin/geojson_rest/pointfeature/ Exception Value: string indices must be integers
split_selector: ['properties', 'time', 'expire_time'] obj: <PointFeature: 13 PP-perhela-perhelan-kortteli T1332262399.441142R0.258137> value: u'' selector: 'properties.time.expire_time' dict_json: {'geometry': {'coordinates': [394857.40191000002, 6704267.5516990004], 'type': 'Point'}, 'group': u'PP-perhela-perhelan-kortteli', 'id': 62, 'private': True, 'properties': {}, 'time': {'create_time': '2012-04-27T07:36:46.011000+00:00', 'expire_time': ''}, 'type': 'Feature', 'user': u'T1335269506.077803R0.502147'} selector_list: ['group', 'user', 'time.expire_time', 'time.create_time', 'geometry', 'type', 'id', 'private', u'properties.form_values', 'properties.group', u'properties.name', 'properties.time.expire_time', 'properties.time.create_time', 'properties.id', 'properties.user'] values: ['PP-perhela-perhelan-kortteli', 'T1335269506.077803R0.502147', '', '2012-04-27T07:36:46.011000+00:00', 'POINT (394857.4019100000150502 6704267.5516990004107356)', 'Feature', '62', 'True', '', '', ''] part_selector: 'expire_time'
Can you reproduce this one with a test?
Test added.
This happens if features properties is empty object and collection also has features with properties.
Cleaned traceback below
TypeError at /admin/geojson_rest/pointfeature/
string indices must be integers
Environment:
Request Method: POST Request URL: https://....../admin/geojson_rest/pointfeature/
Django Version: 1.4.2 Python Version: 2.6.6 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.gis', 'base_page', 'dashboard', 'maps', 'auth_page', 'plan_proposals', 'geonition_client', 'gntauth', 'gntimages', 'geojson_rest', 'geonition_utils', 'geoforms', 'manage_release', 'statics', 'modeltranslation') Installed Middleware: ('django.middleware.gzip.GZipMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'geonition_utils.middleware.PreventCacheMiddleware', 'geonition_utils.middleware.IEEdgeMiddleware')
Traceback: File "/l/apps/softgis/geonition28.env/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
Exception Type: TypeError at /admin/geojson_rest/pointfeature/ Exception Value: string indices must be integers