diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 20:16:07 +0200 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 20:16:07 +0200 |
| commit | b73e8f510f1b3a13d942e1ad42c8a04401eb6b8c (patch) | |
| tree | 26612c20e03adb3cb26c36f36d31576f3c77dc1c /app/model.py | |
| parent | 072d546490ba6cd4422cbc9cd6644b455f58fd46 (diff) | |
| parent | 895ed4be433a4159250b276bd99f574c9c39c98e (diff) | |
Merge branch 'develop' into 'main'3.0
Develop
See merge request KaranJayachandra/match_up!17
Diffstat (limited to 'app/model.py')
| -rw-r--r-- | app/model.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/model.py b/app/model.py index 3ec663e..22424d4 100644 --- a/app/model.py +++ b/app/model.py @@ -20,7 +20,7 @@ class Court(db.Model): status: Mapped[bool] = mc(Boolean, default=True) def __repr__(self): - return f"Court {self.id} is {"active" if self.status else "inactive"}" + return f"Court {self.id} is {'active' if self.status else 'inactive'}" class Player(db.Model): @@ -48,7 +48,7 @@ class Player(db.Model): self.level = level def __repr__(self): - return f"{self.first_name} {self.last_name} is {"active" if self.status else "inactive"}" + return f"{self.first_name} {self.last_name} is {'active' if self.status else 'inactive'}" class Game(db.Model): @@ -87,11 +87,11 @@ class DisplayGame: def __init__(self, game: Game): court = db.session.get(Court, game.court_id) if court is None: - raise ValueError(f"Unknown court") + raise ValueError("Unknown court") self.court = court players = [] for i in range(4): - player_id = getattr(game, f"player_{i+1}") + player_id = getattr(game, f"player_{i + 1}") p = db.session.get(Player, player_id) if p is None: raise ValueError(f"Player ID: {player_id} mismatch.") |
