Skip to content

Commit

Permalink
fix for entry updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe committed Nov 19, 2017
1 parent c5feb2c commit d157776
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions betterbib/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,13 @@ def update(entry1, entry2):
'''
out = entry1
if entry2 is not None:
out.type = entry2.type
out.persons = entry2.persons
if entry2.type:
out.type = entry2.type

if entry2.persons:
out.persons = entry2.persons

for key, value in entry2.fields.items():
out.fields[key] = value
if value:
out.fields[key] = value
return out

0 comments on commit d157776

Please sign in to comment.