diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-22 15:14:12 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-22 15:14:12 +0100 |
commit | 44959fde6494d90d644a11866d86c704a5cf5034 (patch) | |
tree | 8c5ba63061ed544c793b19132ebb3316ea6f9c32 /ctrack/caf | |
parent | 738ec0ee2d06ccaeaff031d4d3350d4319b010f9 (diff) |
blacking
Diffstat (limited to 'ctrack/caf')
-rw-r--r-- | ctrack/caf/models.py | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py index 1754e61..0ff9fed 100644 --- a/ctrack/caf/models.py +++ b/ctrack/caf/models.py @@ -6,10 +6,16 @@ from django.urls.base import reverse class Grading(models.Model): - GRADING_TYPE = [("CONFIDENCE", "Confidence"), ("QUALITY", "Quality"), ("MISC", "Misc")] + GRADING_TYPE = [ + ("CONFIDENCE", "Confidence"), + ("QUALITY", "Quality"), + ("MISC", "Misc"), + ] descriptor = models.CharField(max_length=2, help_text="Q1, C1, etc") description = models.TextField(max_length=250) - type = models.CharField(max_length=20, choices=GRADING_TYPE, help_text="Type of grading") + type = models.CharField( + max_length=20, choices=GRADING_TYPE, help_text="Type of grading" + ) def __str__(self): return self.descriptor @@ -52,7 +58,13 @@ class ApplicableSystem(models.Model): organisation = models.ForeignKey( Organisation, on_delete=models.SET(get_sentinel_org) ) - caf = models.ForeignKey("CAF", on_delete=models.CASCADE, blank=True, null=True, related_name="applicable_systems") + caf = models.ForeignKey( + "CAF", + on_delete=models.CASCADE, + blank=True, + null=True, + related_name="applicable_systems", + ) class Meta: verbose_name = "Applicable System" @@ -67,14 +79,28 @@ class ApplicableSystem(models.Model): class CAF(models.Model): - 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) + 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 + ) version = models.CharField(max_length=10, blank=True, null=True) triage_review_date = models.DateField(blank=True, null=True) - triage_review_inspector = models.ForeignKey(Person, on_delete=models.CASCADE, blank=True, null=True) + triage_review_inspector = models.ForeignKey( + Person, on_delete=models.CASCADE, blank=True, null=True + ) comments = models.TextField(max_length=1000) class Meta: |