Пример #1
0
 def clean(self):
     if not self._has_criteria():
         self.add_error(None, _('minimum_one_criteria'))
     if self.cleaned_data \
             and mdl.proposal_learning_unit.count_search_results(**self.cleaned_data) > \
             LearningUnitSearchForm.MAX_RECORDS:
         raise TooManyResultsException
     return get_clean_data(self.cleaned_data)
Пример #2
0
 def clean(self):
     return get_clean_data(self.cleaned_data)
Пример #3
0
    def clean(self):
        if not self._has_criteria():
            self.add_error(None, _('minimum_one_criteria'))

        return get_clean_data(self.cleaned_data)
Пример #4
0
 def clean(self):
     if self.cleaned_data \
             and mdl.proposal_learning_unit.count_search_results(**self.cleaned_data) > SearchForm.MAX_RECORDS:
         raise TooManyResultsException
     return get_clean_data(self.cleaned_data)
Пример #5
0
 def clean(self):
     if self.cleaned_data and learning_unit_year.count_search_results(
             **self.cleaned_data) > MAX_RECORDS:
         raise TooManyResultsException
     return get_clean_data(self.cleaned_data)
Пример #6
0
 def clean(self):
     return get_clean_data(self.cleaned_data)