Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Support for Panelist Decimal Scores #37

Merged
merged 13 commits into from
Aug 29, 2023
Prev Previous commit
Next Next commit
Ran Black formatting
  • Loading branch information
questionlp committed Aug 25, 2023
commit 37c695a6cc49d1f39e0ef74f1d94895fe819bfb3
4 changes: 3 additions & 1 deletion app/config.py
Original file line number Diff line number Diff line change
@@ -32,7 +32,9 @@ def load_config(
config_dict = json.load(config_file)

settings_config = config_dict.get("settings", None)
settings_config["use_decimal_scores"] = bool(settings_config.get("use_decimal_scores", False))
settings_config["use_decimal_scores"] = bool(
settings_config.get("use_decimal_scores", False)
)

if "database" in config_dict:
database_config = config_dict["database"]
4 changes: 3 additions & 1 deletion app/models/shows.py
Original file line number Diff line number Diff line change
@@ -67,7 +67,9 @@ class ShowPanelist(BaseModel):
default=None, title="Lightning Fill-in-the-Blank Corect Answers"
)
score: Union[int, None] = Field(default=None, title="Panelist Score")
score_decimal: Optional[Decimal] = Field(default=None, title="Panelist Decimal Score")
score_decimal: Optional[Decimal] = Field(
default=None, title="Panelist Decimal Score"
)
rank: Union[str, None] = Field(default=None, title="Panelist Rank")