Skip to content

Commit

Permalink
only append metadata if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinblack committed Jan 16, 2024
1 parent 49f3a3b commit c7500c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arcaflow_plugin_opensearch/opensearch_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def process_bulk_list_generator():
yield operation
doc = item[1]
# Append the global metadata to the document
doc.update(params.metadata)
if params.metadata:
doc.update(params.metadata)
yield doc

if params.username:
Expand Down

0 comments on commit c7500c5

Please sign in to comment.