Skip to content

Commit

Permalink
Result status if disqualified
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeikobelev committed Oct 23, 2023
1 parent d2b7b49 commit ff8bb65
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sportorg/gui/tabs/memory_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def get_values_from_object(self, result):
rented_card,
time_to_hhmmss(i.get_result_otime_current_day())
if i.is_status_ok()
else '',
else i.get_result(),
]
return ret

Expand Down
3 changes: 2 additions & 1 deletion sportorg/models/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ def to_dict(self):
'created_at': self.created_at, # readonly
'result': self.get_result(), # readonly
'result_relay': self.get_result_relay(),
'result_current': self.get_result_otime_current_day().to_str(),
'result_current': self.get_result_otime_current_day().to_str() if self.is_status_ok()
else self.get_result(),
'start_msec': self.get_start_time().to_msec(), # readonly
'finish_msec': self.get_finish_time().to_msec(), # readonly
'result_msec': self.get_result_otime().to_msec(), # readonly
Expand Down
2 changes: 2 additions & 0 deletions sportorg/models/result/result_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def set_places(array):

res.place = last_place
current_place += 1
else:
res.current_result = res.get_result()

def process_relay_results(self, group):
if group and isinstance(group, Group):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ <h2>СУММА (ОЧКИ)</h2>
sum_places += s
}

ok_count = Math.min(store.best, ok_count);
//if(store.best < 99 and store.best > ok_count){
// dsq = true;
//}
Expand Down Expand Up @@ -158,6 +159,7 @@ <h2>СУММА (ОЧКИ)</h2>
sum_time: person.sum_time,
sum_places: person.sum_places,
sum_scores: person.sum_scores.toFixed(1),
ok_count: person.ok_count,
place: '',
person: person
};
Expand Down Expand Up @@ -233,6 +235,7 @@ <h2>СУММА (ОЧКИ)</h2>
{key: 'qual', title: 'Разряд', size: 7},
{key: 'bib', title: 'Номер', size: 6},
{key: 'sum', title: 'Сумма', size: 6},
{key: 'ok_count', title: 'Старты', size: 6},
{key: 'place', title: 'Место', size: 6}
],
active: function (key, val) {
Expand Down

0 comments on commit ff8bb65

Please sign in to comment.