New web ui
This commit is contained in:
1 parent
a360fd9c63
commit
caee27c3ea
11 files changed
+248
-16
No files matched your search
+2
-2
@@ -87,8 +87,8 @@ class CoachingSession:
|
||||
raise ValueError("Некорректный статус самостоятельности")
|
||||
statuses = (self.kitten_independence,) + tuple(independence for _, _, independence in self.extra_kittens)
|
||||
nonself_count = sum(status == "несамостоятельно" for status in statuses)
|
||||
if self.skill == "ЗУ" and len(set(statuses)) > 1:
|
||||
raise ValueError("Для ЗУ все котята в одном отчёте должны иметь одинаковый статус")
|
||||
if self.skill == "ЗУ" and any(s != "самостоятельно" for s in statuses):
|
||||
raise ValueError("Для ЗУ все котята должны быть самостоятельными")
|
||||
if self.skill == "ЛУ" and nonself_count > 1:
|
||||
raise ValueError("Для ЛУ допускается только один несамостоятельный котёнок")
|
||||
|
||||
|
||||
Reference in new issue
Block a user