aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctrack/caf/admin.py4
-rw-r--r--ctrack/caf/migrations/0011_auto_20200225_0830.py23
-rw-r--r--ctrack/caf/models.py4
3 files changed, 28 insertions, 3 deletions
diff --git a/ctrack/caf/admin.py b/ctrack/caf/admin.py
index b0f1218..6a87233 100644
--- a/ctrack/caf/admin.py
+++ b/ctrack/caf/admin.py
@@ -15,9 +15,11 @@ class EssentialServiceAdmin(admin.StackedInline):
class CAFAdmin(admin.ModelAdmin):
+ # TODO - we need the CAF list to show essential services
+ # but this is a many-to-many relationship, so we need to summarise it somehow
model = CAF
inlines = [EssentialServiceAdmin]
- list_display = ["owner", "triage_grading", "confidence_grading", "file"]
+ list_display = ["owner", "quality_grading", "confidence_grading", "file"]
admin.site.register(CAF, CAFAdmin)
diff --git a/ctrack/caf/migrations/0011_auto_20200225_0830.py b/ctrack/caf/migrations/0011_auto_20200225_0830.py
new file mode 100644
index 0000000..826b267
--- /dev/null
+++ b/ctrack/caf/migrations/0011_auto_20200225_0830.py
@@ -0,0 +1,23 @@
+# Generated by Django 2.2.9 on 2020-02-25 08:30
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('caf', '0010_auto_20200225_0747'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='caf',
+ name='triage_grading',
+ ),
+ migrations.AddField(
+ model_name='caf',
+ name='quality_grading',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quality_grading', to='caf.Grading'),
+ ),
+ ]
diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py
index 401bf25..820181e 100644
--- a/ctrack/caf/models.py
+++ b/ctrack/caf/models.py
@@ -61,8 +61,8 @@ class EssentialService(models.Model):
class CAF(models.Model):
owner = models.ForeignKey(Organisation, on_delete=models.CASCADE)
- triage_grading = models.ForeignKey(Grading, on_delete=models.CASCADE, blank=True, null=True,
- related_name="triage_grading")
+ quality_grading = models.ForeignKey(Grading, on_delete=models.CASCADE, blank=True, null=True,
+ related_name="quality_grading")
confidence_grading = models.ForeignKey(Grading, on_delete=models.CASCADE, blank=True, null=True,
related_name="confidence_grading")
file = models.ForeignKey(DocumentFile, on_delete=models.CASCADE, blank=True, null=True)