Skip to content

Commit

Permalink
Fix normalize_user_scripts in coriolis.api.v1.utils module
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristi1324 authored and Dany9966 committed Feb 1, 2024
1 parent 02e278d commit 578a37b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coriolis/api/v1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ def normalize_user_scripts(user_scripts, instances):
selected instances for the replica/migration """
if user_scripts is None:
user_scripts = {}
for instance in user_scripts.get('instances', {}).keys():
for instance in list(user_scripts.get('instances', {}).keys()):
if instance not in instances:
LOG.warn("Removing provided instance '%s' from user_scripts body "
"because it's not included in one of the selected "
"instances for this replica/migration: %s",
instance, instances)
user_scripts.pop(instance, None)
user_scripts['instances'].pop(instance, None)

return user_scripts

Expand Down

0 comments on commit 578a37b

Please sign in to comment.