Fixing iteration for role content 69/7569/1
authorEduardo Sousa <eduardo.sousa@canonical.com>
Wed, 29 May 2019 10:03:57 +0000 (11:03 +0100)
committerEduardo Sousa <eduardo.sousa@canonical.com>
Wed, 29 May 2019 10:03:57 +0000 (11:03 +0100)
Change-Id: I9a72bd0eba2e08441fadfcca9180be07a17653ad
Signed-off-by: Eduardo Sousa <eduardo.sousa@canonical.com>
osm_nbi/admin_topics.py

index d6112e1..a737301 100644 (file)
@@ -865,10 +865,11 @@ class RoleTopicAuth(BaseTopic):
         content[":"] = False
 
         ignore_fields = ["_id", "_admin", "name"]
-        for role_def, value in content.items():
+        content_keys = content.keys()
+        for role_def in content_keys:
             if role_def in ignore_fields:
                 continue
-            content[role_def.replace(".", ":")] = value
+            content[role_def.replace(".", ":")] = content[role_def]
             del content[role_def]
 
     @staticmethod