From: Michael Tremer Date: Tue, 10 Oct 2017 12:50:40 +0000 (+0100) Subject: arches: Let distro editor to use new arches X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b60bedae3239622a6970671f0b4be7cb37080db3;p=pbs.git arches: Let distro editor to use new arches Signed-off-by: Michael Tremer --- diff --git a/src/templates/distro-edit.html b/src/templates/distro-edit.html index 58f6fd12..2f331337 100644 --- a/src/templates/distro-edit.html +++ b/src/templates/distro-edit.html @@ -67,7 +67,7 @@ diff --git a/src/web/handlers_distro.py b/src/web/handlers_distro.py index 1d1314cd..8b814877 100644 --- a/src/web/handlers_distro.py +++ b/src/web/handlers_distro.py @@ -27,7 +27,7 @@ class DistributionEditHandler(BaseHandler): raise tornado.web.HTTPError(404, "Distro not found") self.render("distro-edit.html", distro=distro, - arches=self.arches.get_all(), sources=self.sources) + arches=self.backend.arches, sources=self.sources) @tornado.web.authenticated def post(self, name): @@ -54,15 +54,10 @@ class DistributionEditHandler(BaseHandler): # Update architectures. arches = [] for arch in self.get_arguments("arches", []): - try: - arch_id = int(arch) - except ValueError: + # Check if arch exists + if not self.backend.arches.exists(arch): continue - if not self.arches.exists(arch_id): - continue - - arch = self.arches.get_by_id(arch_id) arches.append(arch) distro.arches = arches