Skip to content

Commit

Permalink
better logging for an error that should not happen but did
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Dec 10, 2020
1 parent 01d6f2d commit d424e2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/management/commands/populate_osf_suids.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def update_suid(normalized_datum, new_suid_identifier):

if duplicate_raw:
if duplicate_raw == raw_datum:
raise Exception(f'wtf the duplicate is the same one ({raw_datum}, {duplicate_raw})')
raise Exception(f'wtf the duplicate is the same one (rawd:{raw_datum}, normd:{normalized_datum}, old_suid:{existing_suid}, new_suid:{new_suid})')
print(f'normd {normalized_datum.id}: handle dupe raw ({raw_datum.id} => {duplicate_raw.id})')
normalized_datum.raw = duplicate_raw
normalized_datum.save()
Expand Down

0 comments on commit d424e2e

Please sign in to comment.