2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-04 02:21:18 +00:00

fix(backend): API description ordering more deterministic (#11649)

* fix(backend): API description ordering more deterministic

* bump API

* Update API version history in api_version.py
This commit is contained in:
Matthias Mair
2026-03-31 23:54:44 +02:00
committed by GitHub
parent 5f3e9a0652
commit 1f01229d30
2 changed files with 6 additions and 1 deletions

View File

@@ -1,11 +1,14 @@
"""InvenTree API version information."""
# InvenTree API version
INVENTREE_API_VERSION = 467
INVENTREE_API_VERSION = 468
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """
v468 -> 2026-03-31 : https://github.com/inventree/InvenTree/pull/11649
- Add ordering to contetype related fields - no functional changes
v467 -> 2026-03-20 : https://github.com/inventree/InvenTree/pull/11573
- Fix definition for the "parent" field on the StockItemSerializer

View File

@@ -288,6 +288,8 @@ def getModelsWithMixin(mixin_class) -> list:
models_with_mixin = [
x for x in db_models if x is not None and issubclass(x, mixin_class)
]
# sort to make resulting list deterministic (and easier to test)
models_with_mixin.sort(key=lambda x: x._meta.label_lower)
# Store the result in the session cache
set_session_cache(cache_key, models_with_mixin)