2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Clear data tweak (#9870)

* Tweaks for config path checks

* Update delete-data task
This commit is contained in:
Oliver
2025-06-26 16:29:12 +10:00
committed by GitHub
parent c283beedb3
commit 73e2532058
3 changed files with 19 additions and 4 deletions

View File

@ -82,9 +82,13 @@ def inventreeInstaller() -> Optional[str]:
if installer:
return str(installer)
elif os.environ.get('INVENTREE_DEVCONTAINER', 'False') == 'True':
if is_true(os.environ.get('INVENTREE_DEVCONTAINER', 'False')):
return 'DEV'
if is_true(os.environ.get('INVENTREE_DOCKER', 'False')):
return 'DOC'
try:
from django.conf import settings
@ -108,6 +112,7 @@ def get_config_dir() -> Path:
return Path('/home/inventree/dev/').resolve()
elif inst == 'PKG':
return Path('/etc/inventree/').resolve()
return get_root_dir().joinpath('config').resolve()