Skip to content

Commit

Permalink
fix: add max length to conclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Sep 13, 2024
1 parent 3bedd9e commit 5b20b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/tprm/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1 on 2024-09-13 18:54
# Generated by Django 5.1 on 2024-09-13 19:01

import django.db.models.deletion
import iam.models
Expand Down Expand Up @@ -96,7 +96,7 @@ class Migration(migrations.Migration):
('dependency', models.IntegerField(default=0, verbose_name='Dependency')),
('maturity', models.IntegerField(default=0, verbose_name='Maturity')),
('trust', models.IntegerField(default=0, verbose_name='Trust')),
('conclusion', models.CharField(blank=True, choices=[('blocker', 'Blocker'), ('warning', 'Warning'), ('ok', 'Ok'), ('not_applicable', 'Not applicable')], null=True, verbose_name='Conclusion')),
('conclusion', models.CharField(blank=True, choices=[('blocker', 'Blocker'), ('warning', 'Warning'), ('ok', 'Ok'), ('not_applicable', 'Not applicable')], max_length=14, null=True, verbose_name='Conclusion')),
('authors', models.ManyToManyField(blank=True, related_name='%(class)s_authors', to=settings.AUTH_USER_MODEL, verbose_name='Authors')),
('compliance_assessment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.complianceassessment')),
('entity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tprm.entity')),
Expand Down
1 change: 1 addition & 0 deletions backend/tprm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Conclusion(models.TextChoices):
Evidence, on_delete=models.SET_NULL, blank=True, null=True
)
conclusion = models.CharField(
max_length=14,
choices=Conclusion.choices,
verbose_name=_("Conclusion"),
blank=True,
Expand Down

0 comments on commit 5b20b87

Please sign in to comment.