2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-06-12 11:38:47 +00:00

[bug] Various fixes (#12057)

* [bug] Various fixes

- Add get_api_url to EmailThread model
- Prevent setting creation during import
- Tweak BarcodeScanHistoryTable

* Tweak barcode history table tests

* Bump API version
This commit is contained in:
Oliver
2026-06-01 14:30:23 +10:00
committed by GitHub
parent 956468eb84
commit f912ba501d
6 changed files with 47 additions and 22 deletions
@@ -1,11 +1,14 @@
"""InvenTree API version information."""
# InvenTree API version
INVENTREE_API_VERSION = 498
INVENTREE_API_VERSION = 499
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """
v499 -> 2026-06-01 : https://github.com/inventree/InvenTree/pull/12057
- Fixes search field issues on the BarcodeScanHistory API endpoint
v498 -> 2026-05-31 : https://github.com/inventree/InvenTree/pull/12055
- Updates the "status_text" field for models which support custom status values
+5
View File
@@ -3355,6 +3355,11 @@ class EmailThread(InvenTree.models.InvenTreeMetadataModel):
unique_together = [['key', 'global_id']]
ordering = ['-updated']
@staticmethod
def get_api_url():
"""Return the API URL associated with the EmailThread model."""
return reverse('api-email-list')
key = models.CharField(
max_length=250,
verbose_name=_('Key'),
@@ -853,11 +853,11 @@ class BarcodeScanResultList(BarcodeScanResultMixin, BulkDeleteMixin, ListAPI):
filterset_class = BarcodeScanResultFilter
filter_backends = SEARCH_ORDER_FILTER
ordering_fields = ['user', 'plugin', 'timestamp', 'endpoint', 'result']
ordering_fields = ['user', 'timestamp', 'endpoint', 'result']
ordering = '-timestamp'
search_fields = ['plugin']
search_fields = ['data']
class BarcodeScanResultDetail(BarcodeScanResultMixin, RetrieveDestroyAPI):
@@ -51,7 +51,9 @@ class AppMixin:
"""
from common.settings import get_global_setting
if settings.PLUGIN_TESTING or get_global_setting('ENABLE_PLUGINS_APP'):
if settings.PLUGIN_TESTING or get_global_setting(
'ENABLE_PLUGINS_APP', create=False
):
logger.info('Registering IntegrationPlugin apps')
apps_changed = False