Spaces:
Sleeping
Sleeping
jarajpu
commited on
Commit
·
4c15e27
1
Parent(s):
99601a6
Adding yesterday match
Browse files
app.py
CHANGED
|
@@ -110,7 +110,7 @@ def get_current_date_ist():
|
|
| 110 |
def get_today_matches():
|
| 111 |
today = get_current_date_ist()
|
| 112 |
matches = load_data(MATCHES_JSON)
|
| 113 |
-
today_matches = [match for match in matches if match['date'] == today
|
| 114 |
return today_matches
|
| 115 |
|
| 116 |
|
|
@@ -160,9 +160,9 @@ def submit_prediction(
|
|
| 160 |
return
|
| 161 |
|
| 162 |
# Check if prediction submission is allowed for the match
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
|
| 167 |
if bid_points > max_bid_points:
|
| 168 |
st.error(f"Your bid points exceed the 20% limit of your total points. Maximum allowed bid points: {max_bid_points}")
|
|
|
|
| 110 |
def get_today_matches():
|
| 111 |
today = get_current_date_ist()
|
| 112 |
matches = load_data(MATCHES_JSON)
|
| 113 |
+
today_matches = [match for match in matches if match['date'] == today]
|
| 114 |
return today_matches
|
| 115 |
|
| 116 |
|
|
|
|
| 160 |
return
|
| 161 |
|
| 162 |
# Check if prediction submission is allowed for the match
|
| 163 |
+
if not is_submission_allowed(match_id):
|
| 164 |
+
st.error("Prediction submission time has passed. Predictions can't be submitted after match start.")
|
| 165 |
+
return
|
| 166 |
|
| 167 |
if bid_points > max_bid_points:
|
| 168 |
st.error(f"Your bid points exceed the 20% limit of your total points. Maximum allowed bid points: {max_bid_points}")
|