Skip to content

Commit

Permalink
(feat) add error handling for dates
Browse files Browse the repository at this point in the history
  • Loading branch information
cardosofede committed Sep 23, 2024
1 parent a9ae419 commit 7587320
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/pages/data/download_candles/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
if get_data_button:
start_datetime = datetime.combine(start_date, time.min)
end_datetime = datetime.combine(end_date, time.max)
if end_datetime < start_datetime:
st.error("End Date should be greater than Start Date.")
st.stop()

candles = backend_api_client.get_historical_candles(
connector=connector,
Expand Down

0 comments on commit 7587320

Please sign in to comment.