start removing lots of print
This commit is contained in:
@@ -84,9 +84,6 @@ class CaseSelect(Select):
|
||||
def create_option(self, *args, **kwargs):
|
||||
option = super().create_option(*args, **kwargs)
|
||||
|
||||
print(option)
|
||||
|
||||
|
||||
return option
|
||||
|
||||
def get_context(self, name: str, value, attrs) -> dict[str, Any]:
|
||||
@@ -694,7 +691,6 @@ class CidReportAnswerMarkForm(ModelForm):
|
||||
#
|
||||
# def __init__(self, *args, user, **kwargs):
|
||||
# super(AddCollectionToCaseForm, self).__init__(*args, **kwargs)
|
||||
# print("INIT", args, kwargs)
|
||||
#
|
||||
# if not user.groups.filter(name="atlas_editor").exists():
|
||||
# queryset = CaseCollection.objects.filter(author__id=user.id)
|
||||
@@ -736,7 +732,6 @@ class AddCollectionToCaseForm(Form):
|
||||
|
||||
def __init__(self, *args, user, **kwargs):
|
||||
super(AddCollectionToCaseForm, self).__init__(*args, **kwargs)
|
||||
print("INIT", args, kwargs)
|
||||
|
||||
if not user.groups.filter(name="atlas_editor").exists():
|
||||
queryset = CaseCollection.objects.filter(author__id=user.id)
|
||||
@@ -752,21 +747,16 @@ class AddCollectionToCaseForm(Form):
|
||||
)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
print("SAVE", args, kwargs)
|
||||
instance = super(AddCollectionToCaseForm, self).save(*args, **kwargs)
|
||||
|
||||
# Here we save the modified project selection back into the database
|
||||
instance.casecollection_set.set(self.cleaned_data['casecollection'])
|
||||
|
||||
print(f"{instance=}")
|
||||
|
||||
return instance
|
||||
|
||||
def clean_casecollection(self):
|
||||
collection_set = self.cleaned_data["casecollection"]
|
||||
|
||||
print(f"{collection_set=}")
|
||||
|
||||
for col in collection_set:
|
||||
if col not in self.valid_collections:
|
||||
raise ValidationError("Invalid collection")
|
||||
|
||||
Reference in New Issue
Block a user