Skip to content
Snippets Groups Projects
Commit e904cf9a authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Fix for notification edit view with label queries

parent d0342e36
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,12 @@ class EditNotificationView(UpdateView):
kw = super(EditNotificationView, self).get_form_kwargs(
*args, **kwargs)
kw['user'] = self.request.user
# Cases that have a label query actually have labels in the database.
# But we don't want to include those in the form because
# a) it's confusing and b) it breaks the form
if self.object.label_query and self.object.labels.exists():
kw['initial']['labels'] = None
return kw
def get_queryset(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment