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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user