Skip to content

Commit

Permalink
Merge pull request #358 from sportorg/who_can_win_start_station
Browse files Browse the repository at this point in the history
Who can win: print only if start time source = protocol
  • Loading branch information
sergeikobelev authored Aug 12, 2019
2 parents efd598a + 6b78889 commit fe27d0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sportorg/libs/sireader
15 changes: 8 additions & 7 deletions sportorg/modules/printing/printout_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,14 @@ def print_split(self, result):

# Info about competitors, who can win current person
if result.is_status_ok() and not is_relay:
if hasattr(result, 'can_win_count'):
if result.can_win_count > 0:
self.print_line(_('Who can win you') + ': ' + str(result.can_win_count), fn, fs_main)
self.print_line(_('Final result will be known') + ': '
+ result.final_result_time.to_str(), fn, fs_main)
else:
self.print_line(_('Result is final'), fn, fs_main)
if obj.get_setting('system_start_source', 'protocol') == 'protocol':
if hasattr(result, 'can_win_count'):
if result.can_win_count > 0:
self.print_line(_('Who can win you') + ': ' + str(result.can_win_count), fn, fs_main)
self.print_line(_('Final result will be known') + ': '
+ result.final_result_time.to_str(), fn, fs_main)
else:
self.print_line(_('Result is final'), fn, fs_main)

# Punch checking info
if result.is_status_ok():
Expand Down

0 comments on commit fe27d0b

Please sign in to comment.