Skip to content

Commit

Permalink
cli: better create documents with items lofis creation
Browse files Browse the repository at this point in the history
* Saves created item or local field records to error file.

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
  • Loading branch information
rerowep committed Oct 24, 2023
1 parent 94d4430 commit 63376d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rero_ils/modules/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def create_lofi(count, local_field, parent_pid, file_lofi, commit, debug,
if debug:
traceback.print_exc()
if save_errors:
error_file_lofi.write(record)
error_file_lofi.write(local_field_rec)
if not dont_stop_on_error:
sys.exit(1)
return counts
Expand Down Expand Up @@ -543,7 +543,7 @@ def filter_isbn(identified_by):
if debug:
traceback.print_exc()
if save_errors:
error_file_item.write(record)
error_file_item.write(item_rec)
if not dont_stop_on_error:
sys.exit(1)
# Local fields for items
Expand Down

0 comments on commit 63376d9

Please sign in to comment.