From 97a7eef014ea46bbeae782df928bc7d38e58579e Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 3 Aug 2019 12:42:37 +0200 Subject: [PATCH] Add medal score --- royalnet/database/tables/medals.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/royalnet/database/tables/medals.py b/royalnet/database/tables/medals.py index 5dc596a0..53a27024 100644 --- a/royalnet/database/tables/medals.py +++ b/royalnet/database/tables/medals.py @@ -27,7 +27,11 @@ class Medal: @declared_attr def classes(self): - return Column(String) + return Column(String, nullable=False, default="") + + @declared_attr + def score(self): + return Column(Integer, nullable=False) def __str__(self): return self.name