Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Hanging Protocols json field raised exception #3727

Merged
4 changes: 3 additions & 1 deletion app/grandchallenge/hanging_protocols/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def __init__(self, *args, **kwargs):

def clean_json(self):
json = self.cleaned_data["json"]
viewport_names = [x["viewport_name"] for x in json]
viewport_names = [
x["viewport_name"] for x in json if "viewport_name" in x
ammar257ammar marked this conversation as resolved.
Show resolved Hide resolved
]

self._validate_viewport_uniqueness(viewport_names=viewport_names)
self._validate_dimensions(value=json)
Expand Down
Loading