Skip to content

Commit

Permalink
[#4801] Iterate over a copy of the dict to modify it
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 12, 2019
1 parent 0f99b93 commit ede7a1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckan/lib/navl/dictization_functions.py
Expand Up @@ -249,7 +249,9 @@ def convert(converter, key, converted_data, errors, context):

def _remove_blank_keys(schema):

for key, value in schema.items():
schema_copy = copy.deepcopy(schema)

for key, value in schema_copy.items():
if len(value) and isinstance(value[0], dict):
for item in value:
if not item:
Expand Down

0 comments on commit ede7a1f

Please sign in to comment.