Skip to content
Snippets Groups Projects

Import orgů

Compare and Show latest version
1 file
+ 0
11
Compare changes
  • Side-by-side
  • Inline
+ 0
11
@@ -83,10 +83,6 @@ class Import:
self.gatekeeper = mo.rights.Gatekeeper(user)
self.user = user
def setup(self):
# Definováno odvozenými třídami
assert NotImplementedError()
def error(self, msg: str) -> Any:
if self.line_number > 0:
if self.row_name:
@@ -129,7 +125,6 @@ class Import:
return name
def check_rights(self, round: db.Round, place: db.Place) -> bool:
assert round is not None
rights = self.gatekeeper.rights_for(place, round.year, round.category, round.seq)
return rights.have_right(mo.rights.Right.manage_contest)
@@ -508,8 +503,6 @@ class ContestImport(Import):
self.contest = contest
self.only_region = only_region
self.default_place = default_place
self.setup()
assert self.round is not None
assert not self.round.is_subround()
def import_row(self, r: mo.csv.Row):
@@ -597,7 +590,6 @@ class OrgsImport(Import):
self.default_cat = self.parse_category(default_cat)
self.default_seq = default_seq
self.default_place = default_place
self.setup()
self.allow_change_user_to_org = allow_change_user_to_org
self.root_place = db.get_root_place()
self.year = round.year if round else year
@@ -672,9 +664,6 @@ class GlobalOrgsImport(OrgsImport):
):
super().__init__(user, **kvargs)
def setup(self):
self.root_place = db.get_root_place()
@dataclass
class PointsImportRow(mo.csv.Row):
Loading