Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Fixed bug in flat_merge()
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-gravgaard committed Aug 21, 2014
1 parent dcd41a3 commit dfe76bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backdrop/core/nested_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def flat_merge(keys, collect, data):
if not collect:
return data

def apply_prefixes(record, keys):
def apply_prefixes(record, prefix_keys):
# the prefix is a string like 'cabinet-office:desktop'
prefix = ':'.join([record[k] for k in group_by_keys if k in record])
prefix = ':'.join([str(record[k]) for k in prefix_keys if k in record])
# we no longer need the items that went into the prefix
record = {k: v for k, v in record.items() if k not in group_by_keys}
record = {k: v for k, v in record.items() if k not in prefix_keys}
for key, method in collect:
old_key = collect_key(key, method)
new_key = '{}:{}'.format(prefix, old_key)
Expand Down

0 comments on commit dfe76bd

Please sign in to comment.