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

bump pre-commit refs (#8219)

This commit is contained in:
Matthias Mair
2024-09-30 23:36:29 +02:00
committed by GitHub
parent 5638895f54
commit af6f179f7e
18 changed files with 55 additions and 53 deletions

View File

@@ -151,11 +151,11 @@ class SampleValidatorPlugin(SettingsMixin, ValidationMixin, InvenTreePlugin):
batch = f'SAMPLE-BATCH-{now.year}:{now.month}:{now.day}'
# If a Part instance is provided, prepend the part name to the batch code
if part := kwargs.get('part', None):
if part := kwargs.get('part'):
batch = f'{part.name}-{batch}'
# If a Build instance is provided, prepend the build number to the batch code
if build := kwargs.get('build_order', None):
if build := kwargs.get('build_order'):
batch = f'{build.reference}-{batch}'
return batch