From 02d40d1b39e8aa398e67b42e3aa42898cf502f48 Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Sat, 7 Mar 2020 16:47:30 +0000 Subject: [PATCH] FIX: Patch for choices being none Honestly no idea if this is going to work, I can't reproduce the issue locally... --- RIGS/versioning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIGS/versioning.py b/RIGS/versioning.py index f9056abf..cd99d353 100644 --- a/RIGS/versioning.py +++ b/RIGS/versioning.py @@ -25,7 +25,7 @@ class FieldComparison(object): self._new = new def display_value(self, value): - if isinstance(self.field, IntegerField) and len(self.field.choices) > 0: + if isinstance(self.field, IntegerField) and self.field.choices is not None and len(self.field.choices) > 0: return [x[1] for x in self.field.choices if x[0] == value][0] if self.field.name == "risk_assessment_edit_url": return "completed" if value else ""