Skip to content
Snippets Groups Projects
Commit e4b4d773 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

make domain optional in ProteinDomainComplex form

fix #77
parent 50d0e941
No related branches found
No related tags found
No related merge requests found
Pipeline #13217 failed
...@@ -252,9 +252,9 @@ class ComplexCompositionForm(forms.Form): ...@@ -252,9 +252,9 @@ class ComplexCompositionForm(forms.Form):
) )
domain = forms.ModelChoiceField( domain = forms.ModelChoiceField(
queryset=Domain.objects.none(), queryset=Domain.objects.none(),
required=True, required=False,
widget=forms.Select(attrs={'class': 'form-control'}), widget=forms.Select(attrs={'class': 'form-control'}),
empty_label=None, empty_label="Unidentified",
) )
ppc_copy_nb = forms.IntegerField( ppc_copy_nb = forms.IntegerField(
label="Number of copies of the protein in the complex", label="Number of copies of the protein in the complex",
...@@ -289,7 +289,6 @@ class ComplexCompositionForm(forms.Form): ...@@ -289,7 +289,6 @@ class ComplexCompositionForm(forms.Form):
self.cleaned_data.get("ppp_copy_nb_per_p", None) is None: self.cleaned_data.get("ppp_copy_nb_per_p", None) is None:
self.add_error("ppp_copy_nb_per_p", _("This field is required")) self.add_error("ppp_copy_nb_per_p", _("This field is required"))
class ComplexCompositionBaseFormSet(forms.BaseFormSet): class ComplexCompositionBaseFormSet(forms.BaseFormSet):
def full_clean(self): def full_clean(self):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment