def __init__(self, ref_name): self.ref_name = ref_name self.project = Project.get(request.context['project_id']) if not self.project: # TODO: nice project not found error template abort(404, 'project not found') request.context['ref'] = ref_name
def __init__(self, _id): self.project = Project.get(request.context['project_id']) self.build = Build.get(_id) if not self.project: # TODO: nice project not found error template abort(404, 'project not found') if not self.build: # TODO: nice project not found error template abort(404, 'build not found')
def index_get(self): project = Project.get(request.context['project_id']) repos = Repo.query.filter_by( project=project, ref=request.context['ref'], sha1=request.context['sha1'], distro=request.context['distro'], distro_version=request.context['distro_version']).all() return [r.flavor for r in repos]