mirror of
https://github.com/inventree/InvenTree.git
synced 2026-02-19 13:18:03 +00:00
Some small style fixes (#6916)
* fix dockerfile syntax * remove unused import * Merge unnecessary if statements * fix PUI package name * remove unused vars * Remove unneeded pass * merge if to reduce likelyhood of future errors * add ignroe script to secure against shell scripts * fix possible collisions * export strings * fix types
This commit is contained in:
@@ -142,9 +142,8 @@ class SampleValidatorPlugin(SettingsMixin, ValidationMixin, InvenTreePlugin):
|
||||
"""
|
||||
prefix = self.get_setting('BATCH_CODE_PREFIX')
|
||||
|
||||
if len(batch_code) > 0:
|
||||
if prefix and not batch_code.startswith(prefix):
|
||||
self.raise_error(f"Batch code must start with '{prefix}'")
|
||||
if len(batch_code) > 0 and prefix and not batch_code.startswith(prefix):
|
||||
self.raise_error(f"Batch code must start with '{prefix}'")
|
||||
|
||||
def generate_batch_code(self):
|
||||
"""Generate a new batch code."""
|
||||
|
||||
Reference in New Issue
Block a user