Skip to content

Commit

Permalink
Merge pull request #186 from ehenneken/diff_author_update
Browse files Browse the repository at this point in the history
update in diff format for non-references
  • Loading branch information
ehenneken committed Dec 9, 2020
2 parents abbd40c + e30f98b commit f5f8798
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion adsws/feedback/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def make_diff(original, updated):
elif isinstance(changes,list):
for item in changes:
try:
results += "{0}\t{1}\n".format(updated['bibcode'], item.replace('(bibcode) ','').replace('(reference) ',''))
if field == 'references':
results += "{0}\t{1}\n".format(updated['bibcode'], item.replace('(bibcode) ','').replace('(reference) ',''))
else:
results += str(item) + "\n"
except:
results += str(item) + "\n"
else:
Expand Down
2 changes: 1 addition & 1 deletion adsws/tests/stubdata/corrected_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
"diff": "%0A%20%20%3E%3E%3E%3E%20Title%0A%20%20test%0A%20%20%3C%3C%3C%3C%0A%0A%20%20%3E%3E%3E%3E%20Publication%0A%20%20test%0A%20%20%3C%3C%3C%3C%0A%0A%20%20%3E%3E%3E%3E%20PublicationDate%0A%20%202020-01%0A%20%20%3C%3C%3C%3C%0A%0A%20%20%3E%3E%3E%3E%20Comments%0A%20%20test%0A%20%20%3C%3C%3C%3C"
}

response = 'From: Tim Hostetler\nAddress: twhostetler0@gmail.com\n\nCorrection for 2021NewA...8301464S:\n\n>>>> $delete\n2021NewA...8301464S\temail\n2021NewA...8301464S\trecaptcha\n2021NewA...8301464S\tentryType\n2021NewA...8301464S\tname\n>>>>\n>>>> collection\n2021NewA...8301464S\tastronomy\n2021NewA...8301464S\tphysics\n>>>>\n'
response = u'From: Tim Hostetler\nAddress: twhostetler0@gmail.com\n\nCorrection for 2021NewA...8301464S:\n\n>>>> $delete\nemail\nrecaptcha\nentryType\nname\n>>>>\n>>>> collection\nastronomy\nphysics\n>>>>\n'

0 comments on commit f5f8798

Please sign in to comment.