Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.web
Commits
5ce6a478
There was a problem fetching the pipeline summary.
Commit
5ce6a478
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[utils] Sub-select apps which are installed before restoring
parent
e740bb16
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/web/utils/management/commands/restore.py
+6
-1
6 additions, 1 deletion
beat/web/utils/management/commands/restore.py
with
6 additions
and
1 deletion
beat/web/utils/management/commands/restore.py
+
6
−
1
View file @
5ce6a478
...
...
@@ -37,7 +37,7 @@ import tempfile
from
django.core.management
import
call_command
from
django.core.management.base
import
BaseCommand
,
CommandError
from
django.conf
import
settings
from
django.apps
import
apps
from
django.apps
import
apps
,
registry
from
.backup
import
APPS
...
...
@@ -102,6 +102,11 @@ class Command(BaseCommand):
exclude
=
arguments
.
get
(
'
exclude
'
)
# remove uninstalled apps
global
APPS
installed_apps
=
registry
.
apps
.
all_models
.
keys
()
exclude
+=
[
app
for
app
in
APPS
if
app
not
in
installed_apps
]
arguments
=
dict
(
verbosity
=
arguments
.
get
(
'
verbosity
'
),
interactive
=
False
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment