-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
423 max abstract #478
423 max abstract #478
Conversation
|
||
def late_init(self): | ||
self.headers = self.file.make_headers(self.file_type['report_type']) | ||
self.max_size = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Размер стоит вынести в аргументы конструктора (= критерия)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Исправил
referat_size = abstract_page - referat_page | ||
abstract_size = main_page - abstract_page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
напомните, что хранится по ключу в self.headers - просто страницы?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, номера страниц, с которых начинается раздел
if referat_size > self.max_size: | ||
return answer(False, | ||
f"<br><br>Размер раздела \"Реферат\" равен {referat_size} страницы, должен быть {self.max_size}") | ||
if abstract_size > self.max_size: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Возможно стоит проверять их в один момент (в плане фидбека, чтобы не было "получил уведомление о реферате -> исправил реферат -> только потом узнал, что ещё и Abstract неверное")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Исправил
No description provided.