2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-11-30 09:20:03 +00:00

Error messages (#10894)

* Add INVE-E14 - Error in config file

* Add INVE-E14

* Fix duplicate code

* Fix numbering
This commit is contained in:
Oliver
2025-11-23 23:11:12 +11:00
committed by GitHub
parent e590522909
commit 7d5429303e
3 changed files with 17 additions and 3 deletions

View File

@@ -200,7 +200,9 @@ def load_config_data(set_cache: bool = False) -> map | None:
data = yaml.safe_load(cfg)
except yaml.parser.ParserError as error:
logger.error(
"Error reading InvenTree configuration file '%s': %s", cfg_file, error
"INVE-E13: Error reading InvenTree configuration file '%s': %s",
cfg_file,
error,
)
sys.exit(1)

View File

@@ -13,7 +13,7 @@ def main():
from django.core.management import execute_from_command_line
except ImportError as exc: # pragma: no cover
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"INVE-E14: Could not import Django. Are you sure it's installed and "
'available on your PYTHONPATH environment variable? Did you '
'forget to activate a virtual environment?'
) from exc