mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
Re-implement no-frontend flag in "invoke update" (#6183)
- Allows old installers to work once more - Ref: https://github.com/inventree/InvenTree/issues/6177
This commit is contained in:
parent
b5b6d75e23
commit
53ac6c724d
6
tasks.py
6
tasks.py
@ -347,9 +347,10 @@ def migrate(c):
|
|||||||
help={
|
help={
|
||||||
'skip_backup': 'Skip database backup step (advanced users)',
|
'skip_backup': 'Skip database backup step (advanced users)',
|
||||||
'frontend': 'Force frontend compilation/download step (ignores INVENTREE_DOCKER)',
|
'frontend': 'Force frontend compilation/download step (ignores INVENTREE_DOCKER)',
|
||||||
|
'no_frontend': 'Skip frontend compilation/download step'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
def update(c, skip_backup=False, frontend: bool = False):
|
def update(c, skip_backup=False, frontend: bool = False, no_frontend: bool = False):
|
||||||
"""Update InvenTree installation.
|
"""Update InvenTree installation.
|
||||||
|
|
||||||
This command should be invoked after source code has been updated,
|
This command should be invoked after source code has been updated,
|
||||||
@ -378,8 +379,7 @@ def update(c, skip_backup=False, frontend: bool = False):
|
|||||||
# If:
|
# If:
|
||||||
# - INVENTREE_DOCKER is set (by the docker image eg.) and not overridden by `--frontend` flag
|
# - INVENTREE_DOCKER is set (by the docker image eg.) and not overridden by `--frontend` flag
|
||||||
# - `--no-frontend` flag is set
|
# - `--no-frontend` flag is set
|
||||||
# if (os.environ.get('INVENTREE_DOCKER', False) and not frontend) or no_frontend:
|
if (os.environ.get('INVENTREE_DOCKER', False) and not frontend) or no_frontend:
|
||||||
if not frontend:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# Decide if we should compile the frontend or try to download it
|
# Decide if we should compile the frontend or try to download it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user