Skip to content

Commit

Permalink
now supports exclude_keys for starttime and endtime
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyinz committed Jan 18, 2024
1 parent 81443ea commit 0393d02
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/mspasspy/db/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -6505,8 +6505,10 @@ def _atomic_save_all_documents(
mspass_object.kill()

# Always set starttime and endtime
insertion_dict["starttime"] = mspass_object.t0
insertion_dict["endtime"] = mspass_object.endtime()
if not exclude_keys or "starttime" not in exclude_keys:
insertion_dict["starttime"] = mspass_object.t0
if not exclude_keys or "endtime" not in exclude_keys:
insertion_dict["endtime"] = mspass_object.endtime()

# add tag - intentionally not set in mspass_object returned
if data_tag:
Expand Down

0 comments on commit 0393d02

Please sign in to comment.