Skip to content

Commit

Permalink
[merge] keep original AN step extras when merging
Browse files Browse the repository at this point in the history
  • Loading branch information
mdamien committed Sep 18, 2018
1 parent 4688ba9 commit 362f12d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tlfp/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,12 @@ def same_stage_step_instit(a, b):

# get data from AN even if there's data on the senat side
if same_stage_step_instit(an_step, step):
# only take source_url from the AN, we've got better infos for now
# from the senat
common_step = copy.deepcopy(step)
if an_step.get('source_url'):
common_step['source_url'] = an_step.get('source_url')
if 'date' not in common_step:
common_step['date'] = an_step.get('date')
# complete AN data with Senate data

This comment has been minimized.

Copy link
@mdamien

mdamien Sep 18, 2018

Author Member

I reverted it, it should be conditional on wich legislature we are in (which parser), so #96 should be fixed before

common_step = copy.deepcopy(an_step)
if not an_step.get('date') and step.get('date'):
common_step['date'] = step['date']
if not an_step.get('source_url') and step.get('source_url'):
common_step['source_url'] = step['source_url']
steps_to_add.append(common_step)

"""
Expand Down

0 comments on commit 362f12d

Please sign in to comment.