mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-21 10:29:29 -05:00
Dont make default version change
This commit is contained in:
parent
0b4b96f7ce
commit
012a553d28
@ -577,4 +577,7 @@ Initial API version.
|
||||
#### Version 7
|
||||
|
||||
- The format of select type custom fields has changed to return the options
|
||||
as an array of objects with `id` and `label` fields.
|
||||
as an array of objects with `id` and `label` fields. When creating or
|
||||
updating a custom field value of a document for a select type custom field,
|
||||
the value should be the `id` of the option whereas previously was the index
|
||||
of the option.
|
||||
|
@ -151,7 +151,6 @@ class TestCustomFieldsAPI(DirectoriesMixin, APITestCase):
|
||||
def test_custom_field_select_unique_ids(self):
|
||||
"""
|
||||
GIVEN:
|
||||
- Nothing
|
||||
- Existing custom field
|
||||
WHEN:
|
||||
- API request to create custom field with select options without id
|
||||
@ -172,6 +171,7 @@ class TestCustomFieldsAPI(DirectoriesMixin, APITestCase):
|
||||
},
|
||||
},
|
||||
),
|
||||
headers={"Accept": "application/json; version=7"},
|
||||
content_type="application/json",
|
||||
)
|
||||
self.assertEqual(resp.status_code, status.HTTP_201_CREATED)
|
||||
@ -197,6 +197,7 @@ class TestCustomFieldsAPI(DirectoriesMixin, APITestCase):
|
||||
},
|
||||
},
|
||||
),
|
||||
headers={"Accept": "application/json; version=7"},
|
||||
content_type="application/json",
|
||||
)
|
||||
self.assertEqual(resp.status_code, status.HTTP_200_OK)
|
||||
@ -560,6 +561,7 @@ class TestCustomFieldsAPI(DirectoriesMixin, APITestCase):
|
||||
},
|
||||
],
|
||||
},
|
||||
headers={"Accept": "application/json; version=7"},
|
||||
format="json",
|
||||
)
|
||||
|
||||
|
@ -341,7 +341,7 @@ REST_FRAMEWORK = {
|
||||
"rest_framework.authentication.SessionAuthentication",
|
||||
],
|
||||
"DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.AcceptHeaderVersioning",
|
||||
"DEFAULT_VERSION": "7",
|
||||
"DEFAULT_VERSION": "1",
|
||||
# Make sure these are ordered and that the most recent version appears
|
||||
# last
|
||||
"ALLOWED_VERSIONS": ["1", "2", "3", "4", "5", "6", "7"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user