@ -10,6 +10,8 @@ class Model {
let model = this.getModel();
let obj = JSON.parse(JSON.stringify(this.record.get({ plain: true })));
for (let key in obj) {
if (!model.tableAttributes[key]) continue;
if (model.tableAttributes[key].type instanceof Sequelize.JSON && typeof obj[key] === 'string') {
try {
this[key] = JSON.parse(obj[key]);
@ -53,6 +53,8 @@ class ContestRanklist extends Model {
for (let i in player.score_details) {
let judge_state = await JudgeState.fromID(player.score_details[i].judge_id);
if (!judge_state) continue;
player.latest = Math.max(player.latest, judge_state.submit_time);
if (player.score_details[i].score != null) {