Skip to content
Snippets Groups Projects
Commit 4f7cf53e authored by Jan Prachař's avatar Jan Prachař
Browse files

Import: Upozornit na chybějící # v kódu školy/místa

parent 3cb7c76d
No related branches found
No related tags found
1 merge request!60Import: Upozornit na chybějící # v kódu školy/místa
......@@ -133,7 +133,8 @@ class Import:
place = db.get_place_by_code(kod)
if not place:
return self.error(f'Místo "{kod}" nenalezeno')
return self.error(f'Místo s kódem "{kod}" nenalezeno'+
('. Nechybí vám # na začátku?' if re.fullmatch(r'\d+', kod) else ''))
if not self.check_rights(place):
return self.error(f'K místu "{kod}" nemáte práva na správu soutěže')
......@@ -150,7 +151,8 @@ class Import:
place = db.get_place_by_code(kod, fetch_school=True)
if not place:
return self.error(f'Škola "{kod}" nenalezena')
return self.error(f'Škola s kódem "{kod}" nenalezena'+
('. Nechybí vám # na začátku?' if re.fullmatch(r'\d+', kod) else ''))
if place.type != db.PlaceType.school:
return self.error(f'Kód školy "{kod}" neodpovídá škole')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment