diff --git a/beat/web/utils/management/commands/restore.py b/beat/web/utils/management/commands/restore.py index e743eb4b1b9269e119aadb66fc1553336f5c6e70..1011d694ac84bbd7636c69416e47eea0c3308e81 100644 --- a/beat/web/utils/management/commands/restore.py +++ b/beat/web/utils/management/commands/restore.py @@ -99,6 +99,8 @@ class Command(BaseCommand): with tarfile.open(arguments['backup']) as tar: tar.extractall(tmpdir) + exclude = arguments.get('exclude') + arguments = dict( verbosity=arguments.get('verbosity'), interactive=False, @@ -119,7 +121,7 @@ class Command(BaseCommand): # and loads the apps respecting the imposed order for app in APPS: - if app in arguments.get('exclude'): continue + if app in exclude: continue # copy prefix data path = os.path.join(settings.PREFIX, app) srcdir = os.path.join(tmpdir, 'prefix', app)