Skip to content

Commit

Permalink
Add export id to callback "nonce" data (#144)
Browse files Browse the repository at this point in the history
* add export id to callback "nonce" data

* field name
  • Loading branch information
jbukhari authored Jul 31, 2024
1 parent d438ae2 commit f6fe0d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dlx_dl/scripts/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def submit_to_dl(record, export_start, args):
'Content-Type': 'application/xml; charset=utf-8',
}

nonce = {'type': args.type, 'id': record.id, 'key': args.nonce_key}
nonce = {'type': args.type, 'id': record.id, 'export_start': str(export_start), 'key': args.nonce_key}

params = {
'mode': 'insertorreplace',
Expand Down
6 changes: 3 additions & 3 deletions dlx_dl/scripts/sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def compare_and_update(args, *, dlx_record, dl_record):

if dl_record.get_field('980') is None:
print(f'{dlx_record.id} MISSING 980')
export_whole_record(args, dlx_record, export_type='UPDATE')
return export_whole_record(args, dlx_record, export_type='UPDATE')

skip_fields = ['035', '909', '949', '980', '998']
dlx_fields = list(filter(lambda x: x.tag not in skip_fields, dlx_record.datafields))
Expand All @@ -542,7 +542,7 @@ def compare_and_update(args, *, dlx_record, dl_record):
dl_fields_serialized = [x.to_mrk() for x in dl_fields]

# dlx -> dl
for field in dlx_fields:
for field in dlx_fields:
if field.tag == '856':
url = field.get_value('u')

Expand Down Expand Up @@ -715,7 +715,7 @@ def submit_to_dl(args, record, *, mode, export_start, export_type):
'Content-Type': 'application/xml; charset=utf-8',
}

nonce = {'type': args.type, 'id': record.id, 'key': args.nonce_key}
nonce = {'type': args.type, 'id': record.id, 'export_start': str(export_start),'key': args.nonce_key}

params = {
'mode': mode,
Expand Down

0 comments on commit f6fe0d1

Please sign in to comment.