2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-04 10:31:03 +00:00

Merge branch 'master' into shipment-parameters

This commit is contained in:
Oliver
2026-03-31 20:56:52 +11:00
committed by GitHub
3 changed files with 15 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ Each *Stock Item* is linked to the following information:
**Last Updated** - Date that the stock quantity was last updated
**Last Stocktake** - Date of most recent stocktake (count) of this item
**Last Stocktake** - Date that this stock item was last counted
**Status** - Status of this stock item

View File

@@ -97,6 +97,10 @@ class MachineSettingList(APIView):
)
all_settings.extend(list(settings_dict.values()))
# Sort settings by the 'key' field before returning,
# to ensure a deterministic order in the API response
all_settings = sorted(all_settings, key=lambda x: x.key)
results = MachineSerializers.MachineSettingSerializer(
all_settings, many=True
).data

View File

@@ -380,8 +380,12 @@ class PluginAllSettingList(APIView):
settings_definition=settings, plugin=plugin.plugin_config()
)
# Sort settings by the 'key' field before returning,
# to ensure a deterministic order in the API response
settings_values = sorted(settings_dict.values(), key=lambda x: x.key)
results = PluginSerializers.PluginSettingSerializer(
list(settings_dict.values()), many=True
settings_values, many=True
).data
return Response(results)
@@ -444,8 +448,12 @@ class PluginUserSettingList(APIView):
user=request.user,
)
# Sort settings by the 'key' field before returning,
# to ensure a deterministic order in the API response
settings_values = sorted(settings_dict.values(), key=lambda x: x.key)
results = PluginSerializers.PluginUserSettingSerializer(
list(settings_dict.values()), many=True
settings_values, many=True
).data
return Response(results)