diff options
Diffstat (limited to 'ctrack/caf')
-rw-r--r-- | ctrack/caf/admin.py | 2 | ||||
-rw-r--r-- | ctrack/caf/forms.py | 2 | ||||
-rw-r--r-- | ctrack/caf/migrations/0018_remove_caf_owner.py | 17 | ||||
-rw-r--r-- | ctrack/caf/models.py | 1 | ||||
-rw-r--r-- | ctrack/caf/tests/factories.py | 1 |
5 files changed, 19 insertions, 4 deletions
diff --git a/ctrack/caf/admin.py b/ctrack/caf/admin.py index 5e68ce4..ecdfd58 100644 --- a/ctrack/caf/admin.py +++ b/ctrack/caf/admin.py @@ -19,7 +19,7 @@ class CAFAdmin(admin.ModelAdmin): # but this is a many-to-many relationship, so we need to summarise it somehow model = CAF inlines = [ApplicableSystemAdmin] - list_display = ["owner", "quality_grading", "confidence_grading", "file"] + list_display = ["quality_grading", "confidence_grading", "file"] admin.site.register(CAF, CAFAdmin) diff --git a/ctrack/caf/forms.py b/ctrack/caf/forms.py index 8ef9793..fb5e32a 100644 --- a/ctrack/caf/forms.py +++ b/ctrack/caf/forms.py @@ -24,7 +24,7 @@ class CAFForm(forms.ModelForm): class Meta: model = CAF - fields = ["owner", "file"] + fields = ["file"] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/ctrack/caf/migrations/0018_remove_caf_owner.py b/ctrack/caf/migrations/0018_remove_caf_owner.py new file mode 100644 index 0000000..02d28c7 --- /dev/null +++ b/ctrack/caf/migrations/0018_remove_caf_owner.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.9 on 2020-03-04 19:47 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('caf', '0017_auto_20200304_1925'), + ] + + operations = [ + migrations.RemoveField( + model_name='caf', + name='owner', + ), + ] diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py index 0fbfcd8..b488962 100644 --- a/ctrack/caf/models.py +++ b/ctrack/caf/models.py @@ -60,7 +60,6 @@ class ApplicableSystem(models.Model): class CAF(models.Model): - owner = models.ForeignKey(Organisation, on_delete=models.CASCADE) 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, diff --git a/ctrack/caf/tests/factories.py b/ctrack/caf/tests/factories.py index 31e2403..f2275a4 100644 --- a/ctrack/caf/tests/factories.py +++ b/ctrack/caf/tests/factories.py @@ -8,7 +8,6 @@ from ctrack.organisations.tests.factories import OrganisationFactory, PersonFact class CAFFactory(factory.DjangoModelFactory): - owner = factory.SubFactory(OrganisationFactory) quality_grading = factory.SubFactory("ctrack.caf.tests.factories.GradingFactory") confidence_grading = factory.SubFactory("ctrack.caf.tests.factories.GradingFactory") file = None |