Skip to content

Commit 9d55c56

Browse files
committed
add no_mark_reason to Response model
Allows people to state why they didn't award a mark.
1 parent 8f3b960 commit 9d55c56

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Generated by Django 4.2.11 on 2024-06-12 09:25
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("crowdsourcer", "0050_add_previous_q_link"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="historicalresponse",
15+
name="no_marks_reason",
16+
field=models.CharField(
17+
blank=True,
18+
choices=[
19+
("no_evidence", "No evidence found"),
20+
("critera_not_met", "Evidence doesn't meet criteria"),
21+
("no_penalty_mark", "No penalty mark"),
22+
("no_foi_response", "No response from FOI"),
23+
],
24+
max_length=50,
25+
null=True,
26+
),
27+
),
28+
migrations.AddField(
29+
model_name="response",
30+
name="no_marks_reason",
31+
field=models.CharField(
32+
blank=True,
33+
choices=[
34+
("no_evidence", "No evidence found"),
35+
("critera_not_met", "Evidence did not meet criteria"),
36+
],
37+
max_length=50,
38+
null=True,
39+
),
40+
),
41+
]

crowdsourcer/models.py

+15
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ def __str__(self):
225225

226226

227227
class Response(models.Model):
228+
NO_MARKS_REASON_CHOICES = [
229+
("no_evidence", "No evidence found"),
230+
("critera_not_met", "Evidence doesn't meet criteria"),
231+
("no_penalty_mark", "No penalty mark"),
232+
("no_foi_response", "No response from FOI"),
233+
]
234+
228235
authority = models.ForeignKey(PublicAuthority, on_delete=models.CASCADE)
229236
question = models.ForeignKey(Question, on_delete=models.CASCADE)
230237
user = models.ForeignKey(User, on_delete=models.CASCADE)
@@ -264,6 +271,14 @@ class Response(models.Model):
264271
verbose_name="Council responded via Right of Reply",
265272
help_text="The council did not respond to the FOI request, but did provide the information as part of their Right of Reply response",
266273
)
274+
no_marks_reason = models.CharField(
275+
max_length=50,
276+
blank=True,
277+
null=True,
278+
choices=NO_MARKS_REASON_CHOICES,
279+
verbose_name="Reason for giving no marks (if applicable)",
280+
help_text="If you selected No, None or similar please supply a reason. If you could not find any evidence for the question then select 'No evidence found'. If there was evidence but it did not meet the criteria (e.g. the number of buildings retrofitted was less than the minimum) then select 'Evidence doesn't meet criteria'.",
281+
)
267282
revision_type = models.CharField(max_length=200, blank=True, null=True)
268283
revision_notes = models.TextField(blank=True, null=True)
269284
created = models.DateTimeField(auto_now_add=True)

0 commit comments

Comments
 (0)