aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2023-12-08 00:28:25 -0800
committerPinapelz <yukais@pinapelz.com>2023-12-08 00:28:25 -0800
commite1df1ff16bce76bb3c21d80e96db08b5a1ec28a2 (patch)
tree2a0057d6c12cfaaf3a4d3108c6e1f8db4af662da
parent591255b19687ae659f290c83a1471be9e4299489 (diff)
raise overflow error if projection is negative
-rw-r--r--backend/app.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/app.py b/backend/app.py
index 46336f6..e042a35 100644
--- a/backend/app.py
+++ b/backend/app.py
@@ -110,6 +110,8 @@ def get_channel_information(channel_name):
days_until_next_milestone_scalar = int(days_until_next_milestone[0])
next_milestone_date = (df.index[0] + pandas.Timedelta(days=days_until_next_milestone_scalar)).date()
time_until_next_milestone = (next_milestone_date - datetime.datetime.now().date()).days
+ if time_until_next_milestone < 0:
+ raise OverflowError
channel_data["next_milestone_date"] = str(next_milestone_date)
channel_data["days_until_next_milestone"] = str(time_until_next_milestone)
channel_data["next_milestone"] = str(next_milestone)
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage