diff --git a/help/fr/api-get.page b/help/fr/api-get.page index 64d03cbd9..09c717245 100644 --- a/help/fr/api-get.page +++ b/help/fr/api-get.page @@ -40,7 +40,7 @@ Le contenu ainsi obtenu est le suivantĀ : { - "id": "newsletter/16", + "id": "16", "receipt_time": "2013-01-04T13:39:47", "last_update_time": "2013-01-04T13:41:21", "fields": { diff --git a/tests/test_api.py b/tests/test_api.py index 4d4a08e1e..8c8d1283e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1639,7 +1639,7 @@ def test_api_anonymized_formdata(pub, local_user, admin_user): assert not 'who' in resp.json[0]['evolution'][0] assert 'time' in resp.json[0]['evolution'][0] # check anonymise is enforced on detail view - resp = get_app(pub).get(sign_uri('/api/forms/%s/?anonymise&full=on' % resp.json[1]['id'])) + resp = get_app(pub).get(sign_uri('/api/forms/test/%s/?anonymise&full=on' % resp.json[1]['id'])) assert 'receipt_time' in resp.json assert 'fields' in resp.json assert 'user' not in resp.json diff --git a/wcs/formdata.py b/wcs/formdata.py index 3b6b691a9..e6341410f 100644 --- a/wcs/formdata.py +++ b/wcs/formdata.py @@ -944,7 +944,7 @@ class FormData(StorableObject): def get_json_export_dict(self, include_files=True, anonymise=False): data = {} - data['id'] = '%s/%s' % (self.formdef.url_name, self.id) + data['id'] = str(self.id) data['display_id'] = self.get_display_id() data['display_name'] = self.get_display_name() data['receipt_time'] = self.receipt_time