.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.2.10 on 2021-12-23 17:28
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0023_case_previous_case'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='case',
|
||||
name='previous_case',
|
||||
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='next_case', to='atlas.case'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.10 on 2021-12-23 17:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('generic', '0022_ciduser_results_email_sent'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='examination',
|
||||
name='examination',
|
||||
field=models.CharField(max_length=200, unique=True),
|
||||
),
|
||||
]
|
||||
+1
-1
@@ -41,7 +41,7 @@ class Contrast(models.Model):
|
||||
|
||||
|
||||
class Examination(models.Model):
|
||||
examination = models.CharField(max_length=200)
|
||||
examination = models.CharField(max_length=200, unique=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.examination
|
||||
|
||||
+1
-1
@@ -1253,7 +1253,7 @@ class ExaminationAutocomplete(autocomplete.Select2QuerySetView):
|
||||
if self.q:
|
||||
# This raises a fielderror which breaks creating a new item if not caught
|
||||
try:
|
||||
qs = qs.filter(name__icontains=self.q)
|
||||
qs = qs.filter(examination__icontains=self.q)
|
||||
except FieldError:
|
||||
return Examination.objects.none()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user