0001-api-include-id-text-keys-in-geojson-properties-55722.patch
tests/api/test_formdata.py | ||
---|---|---|
1041 | 1041 |
resp = get_app(pub).get(sign_uri('/api/forms/test/geojson', user=local_user)) |
1042 | 1042 |
assert 'features' in resp.json |
1043 | 1043 |
assert len(resp.json['features']) == 10 |
1044 |
assert resp.json['features'][0]['properties']['id'] == '1-28' |
|
1045 |
assert resp.json['features'][0]['properties']['text'] == 'test #1-28' |
|
1044 | 1046 |
display_fields = resp.json['features'][0]['properties']['display_fields'] |
1045 | 1047 |
assert len(display_fields) == 5 |
1046 | 1048 |
for field in display_fields: |
wcs/backoffice/management.py | ||
---|---|---|
125 | 125 |
feature = { |
126 | 126 |
'type': 'Feature', |
127 | 127 |
'properties': { |
128 |
'id': str(formdata.get_display_id()), |
|
129 |
'text': formdata.get_display_name(), |
|
128 | 130 |
'name': str(htmlescape(formdata.get_display_name())), |
129 | 131 |
'url': formdata_backoffice_url, |
130 | 132 |
'status_name': str(htmlescape(status.name)), |
131 |
- |