Fix race frontend issue with no users
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 21s
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 21s
This commit is contained in:
@ -9,7 +9,7 @@ app.url_map.strict_slashes = False
|
|||||||
db: SQLAlchemy = SQLAlchemy()
|
db: SQLAlchemy = SQLAlchemy()
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
||||||
# NOTE: These imports are required to register the routes. They need to be after "app" is declared
|
# NOTE: These imports are required to register the routes. They need to be imported after "app" is declared
|
||||||
import formula10.controller.race_controller # type: ignore
|
import formula10.controller.race_controller # type: ignore
|
||||||
import formula10.controller.season_controller # type: ignore
|
import formula10.controller.season_controller # type: ignore
|
||||||
import formula10.controller.admin_controller # type: ignore
|
import formula10.controller.admin_controller # type: ignore
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small>
|
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
{% if model.all_users() | length > 0 %}
|
||||||
{% for user in model.all_users() %}
|
{% for user in model.all_users() %}
|
||||||
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=model.current_race.name) %}
|
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=model.current_race.name) %}
|
||||||
|
|
||||||
@ -70,6 +71,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<td> </td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -116,6 +120,7 @@
|
|||||||
<small><span class="fw-bold">Guessed:</span> P{{ past_result.race.place_to_guess }}</small>
|
<small><span class="fw-bold">Guessed:</span> P{{ past_result.race.place_to_guess }}</small>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
{% if model.all_users_or_active_user() | length > 0 %}
|
||||||
{% for user in model.all_users_or_active_user() %}
|
{% for user in model.all_users_or_active_user() %}
|
||||||
<td class="text-center text-nowrap">
|
<td class="text-center text-nowrap">
|
||||||
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=past_result.race.name) %}
|
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=past_result.race.name) %}
|
||||||
@ -140,6 +145,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<td> </td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{# Actual result #}
|
{# Actual result #}
|
||||||
<td class="text-center text-nowrap">
|
<td class="text-center text-nowrap">
|
||||||
|
Reference in New Issue
Block a user