Skip to content

Commit

Permalink
make check for different time columns robust to different allowed arg…
Browse files Browse the repository at this point in the history
…ument types.
  • Loading branch information
ehneilsen committed Apr 24, 2024
1 parent 8dfa79c commit 81285af
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions schedview/plot/nightly.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Plots that summarize a night's visits and other parameters."""

import bokeh
import bokeh.models
import colorcet
import numpy as np

Expand Down Expand Up @@ -258,8 +259,12 @@ def plot_alt_vs_time(
Bokeh figure object
"""
for time_column in "start_date", "observationStartDatetime64":
if time_column in visits:
break
if isinstance(visits, bokeh.models.ColumnDataSource):
if time_column in visits.data:
break
else:
if time_column in visits:
break

if figure is None:
fig = bokeh.plotting.figure(
Expand Down

0 comments on commit 81285af

Please sign in to comment.