2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 18:45:40 +00:00

Add barcode actions for SalesOrderShipment (#9746)

* Add barcode actions for SalesOrderShipment

* Handle error on worker boot
This commit is contained in:
Oliver
2025-06-07 20:08:20 +10:00
committed by GitHub
parent 4660b9477b
commit 12677ccf22
2 changed files with 7 additions and 1 deletions

View File

@ -641,7 +641,12 @@ def check_for_migrations(force: bool = False, reload_registry: bool = True) -> b
def set_pending_migrations(n: int):
"""Helper function to inform the user about pending migrations."""
logger.info('There are %s pending migrations', n)
set_global_setting('_PENDING_MIGRATIONS', n, None)
try:
set_global_setting('_PENDING_MIGRATIONS', n, None)
except Exception:
# If the setting cannot be set, we just log a warning
logger.error('Could not clear _PENDING_MIGRATIONS flag')
logger.info('Checking for pending database migrations')

View File

@ -317,6 +317,7 @@ export default function SalesOrderShipmentDetail() {
key='barcode'
model={ModelType.salesordershipment}
pk={shipment.pk}
hash={shipment?.barcode_hash}
/>,
<PrintingActions
key='print'