From 283c771e874af1a7d7a5a56067ead5e95cdff28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sun, 6 Oct 2019 10:36:49 -0400 Subject: [PATCH 1/5] Fix AttributeError on motion sorting In 3872da0, a check for whether there is a motion was added, but an oversight looked for an attribute to the None. This commit sets the sorting to 0 in the case the motion doesn't exist. Also marked the question mark for translation. --- tabbycat/utils/tables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbycat/utils/tables.py b/tabbycat/utils/tables.py index 287b58e3085..eda8ee00aad 100644 --- a/tabbycat/utils/tables.py +++ b/tabbycat/utils/tables.py @@ -622,11 +622,11 @@ def add_motion_column(self, motions, show_order=False): 'tooltip': _("Order as listed"), }, [{ 'text': motion.seq if motion is not None else self.BLANK_TEXT, - 'sort': motion.round.seq + (motion.seq * 0.1) if motion is not None else motion.round.seq + 'sort': motion.round.seq + (motion.seq * 0.1) if motion is not None else 0 } for motion in motions]) motion_data = [{ - 'text': motion.reference if motion.reference else '?', + 'text': motion.reference if motion.reference else _('?'), 'popover': {'content' : [{'text': motion.text}]} } if motion else self.BLANK_TEXT for motion in motions] self.add_column({'key': "motion", 'title': _("Motion")}, motion_data) From 0d02a23e4863a814d69de3d7ca831cf8240487ef Mon Sep 17 00:00:00 2001 From: Philip Belesky Date: Sat, 19 Oct 2019 12:55:02 +1100 Subject: [PATCH 2/5] Touch up to 070a0e --- tabbycat/results/result.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tabbycat/results/result.py b/tabbycat/results/result.py index dfd7ae8750a..04a7a6169e7 100644 --- a/tabbycat/results/result.py +++ b/tabbycat/results/result.py @@ -537,7 +537,6 @@ def get_score(self, adjudicator, side, position): return None def set_score(self, adjudicator, side, position, score): - scoresheet = self.scoresheets[adjudicator] try: scoresheet = self.scoresheets[adjudicator] except KeyError: From 7cd4c19f8dca18805b52029f0e6a0126990f5e65 Mon Sep 17 00:00:00 2001 From: Philip Belesky Date: Sat, 19 Oct 2019 13:04:57 +1100 Subject: [PATCH 3/5] Suppress unavailability highlights in drag/drop UIs for #1279 --- tabbycat/draw/templates/DraggableTeam.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tabbycat/draw/templates/DraggableTeam.vue b/tabbycat/draw/templates/DraggableTeam.vue index 4e02c41f34d..bb2056b02c2 100644 --- a/tabbycat/draw/templates/DraggableTeam.vue +++ b/tabbycat/draw/templates/DraggableTeam.vue @@ -1,5 +1,5 @@