Skip to content

Commit

Permalink
Fixing mappings with and without contexts
Browse files Browse the repository at this point in the history
Returning default mapping if contexts are defined but none applies
  • Loading branch information
albertmeronyo committed Apr 3, 2015
1 parent d89582e commit c9242fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_mappings_for(self, literal, context_map):
return self._mappings[literal]['context'][context]

# Nothing matches
return None
return self._mappings[literal]['default']

class RuleMaker(object):
def __init__(self, configuration, dataset, output_file_name):
Expand Down

0 comments on commit c9242fd

Please sign in to comment.