Skip to content

Commit

Permalink
Merge pull request #370 from AxFoundation/fix_runselection
Browse files Browse the repository at this point in the history
fix runselection for None entries
  • Loading branch information
JoranAngevaare committed Dec 21, 2020
2 parents c4ae965 + effdec8 commit d169ea4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strax/run_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def scan_runs(self: strax.Context,
if ('start' in store_fields
and 'end' in store_fields
and 'livetime' in store_fields
and 'start' in doc
and 'end' in doc):
and doc.get('start') is not None
and doc.get('end') is not None):
doc.setdefault('livetime', doc['end'] - doc['start'])

# Put the strax defaults stuff into a different cache
Expand Down

0 comments on commit d169ea4

Please sign in to comment.