Skip to content

Commit

Permalink
fix aprob_mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinaProsche committed Nov 13, 2023
1 parent 6289ec5 commit fd9dab0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 2 additions & 4 deletions app/main/checks/presentation_checks/find_def_sld.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ def check(self):
found_slides.append(self.file.get_text_from_slides()[i - 1])
self.found_idxs.append(i)
if len(found_slides) == 0:
self.file.found_index[str(self.type_of_slide)] = None
return answer(False, 'Слайд не найден')
else:
if self.type_of_slide == 'Апробация':
self.file.found_index['Апробация'] = ''.join(str(item) for item in self.found_idxs)
else:
self.file.found_index['Апробация'] = None
self.file.found_index[str(self.type_of_slide)] = ''.join(str(item) for item in self.found_idxs)
found_idxs_link = self.format_page_link(self.found_idxs)
return answer(True, 'Найден под номером: {}'.format(', '.join(map(str, found_idxs_link))))

Expand Down
10 changes: 3 additions & 7 deletions app/main/checks/presentation_checks/verify_git_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PresVerifyGitLinkCheck(BasePresCriterion):
description = "Проверка действительности ссылки на github"
id = 'verify_git_link'

def __init__(self, file_info, deep_check=False):
def __init__(self, file_info, deep_check=True):
super().__init__(file_info)
self.deep_check = deep_check
self.wrong_repo_ref = []
Expand Down Expand Up @@ -63,16 +63,12 @@ def check(self):
self.deep_check_repo(i, link)
except (requests.exceptions.SSLError, requests.exceptions.ConnectionError):
self.wrong_repo_ref.append(i[0])
if self.wrong_repo_ref and not self.empty_repo_ref:
if self.wrong_repo_ref:
string_result += f" <br> Найдены несуществующие или закрытые репозитории: {', '.join([repr(repo) for repo in self.wrong_repo_ref])}"
check_result = False
elif self.empty_repo_ref and not self.wrong_repo_ref:
if self.empty_repo_ref:
string_result += f" <br> Найдены пустые репозитории: {', '.join([repr(repo) for repo in self.empty_repo_ref])}"
check_result = False
elif self.empty_repo_ref and self.wrong_repo_ref:
string_result += f" <br> Найдены пустые репозитории: {', '.join([repr(repo) for repo in self.empty_repo_ref])}" \
f" <br> Также найдены несуществующие или закрытые репозитории: {', '.join([repr(repo) for repo in self.wrong_repo_ref])}"
check_result = False
else:
string_result = 'Пройдена!'
check_result = True
Expand Down

0 comments on commit fd9dab0

Please sign in to comment.