Skip to content

Commit

Permalink
Merge pull request #863 from comic/fix-852
Browse files Browse the repository at this point in the history
Allow `optic_disk` ArrayField to be an empty list
  • Loading branch information
jmsmkn authored Jul 30, 2019
2 parents 968070d + 9d6c59a commit 0c860b8
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 93 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ django = "<2.3"
django-countries = "*"
django-crispy-forms = "*"
django-userena-ce = "*"
djangorestframework = "<3.10"
djangorestframework = "*"
docker = "*"
matplotlib = "*"
"oauth2" = "*"
Expand Down
176 changes: 85 additions & 91 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 2.2.3 on 2019-07-30 12:34

import django.contrib.postgres.fields
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [("annotations", "0005_imagetextannotation")]

operations = [
migrations.AlterField(
model_name="etdrsgridannotation",
name="optic_disk",
field=django.contrib.postgres.fields.ArrayField(
base_field=models.FloatField(),
blank=True,
default=list,
size=2,
),
)
]
4 changes: 3 additions & 1 deletion app/grandchallenge/annotations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ class ETDRSGridAnnotation(AbstractImageAnnotationModel):

# Fields for location of fovea and optic disk on the images: (x,y) coordinates
fovea = ArrayField(models.FloatField(), size=2)
optic_disk = ArrayField(models.FloatField(), size=2)
optic_disk = ArrayField(
models.FloatField(), size=2, default=list, blank=True
)

class Meta(AbstractImageAnnotationModel.Meta):
unique_together = ("image", "grader", "created")
Expand Down

0 comments on commit 0c860b8

Please sign in to comment.