feat: add negative response flag to question models

This commit is contained in:
James Graham
2022-03-31 18:48:18 +01:00
parent 183c8706b6
commit c50bdca3eb
2 changed files with 36 additions and 0 deletions

View File

@@ -114,6 +114,9 @@ class QuestionChoice(models.Model):
#: Position of this answer in the list
order = models.SmallIntegerField(default=0, blank=False, null=False)
#: Does this answer represent the negative response?
is_negative_response = models.BooleanField(default=False)
@property
def slug(self) -> str:
return slugify(self.text)