def remove_module_md(cls, user, copr_chroot): UsersLogic.raise_if_cant_update_copr( user, copr_chroot.copr, "Only owners and admins may update their projects.") copr_chroot.module_md_name = None copr_chroot.module_md_zlib = None ActionsLogic.send_update_module_md(copr_chroot) db.session.add(copr_chroot)
def _update_chroot(cls, buildroot_pkgs, comps, comps_name, module_md, module_md_name, copr_chroot): copr_chroot.buildroot_pkgs = buildroot_pkgs if comps_name is not None: copr_chroot.update_comps(comps) copr_chroot.comps_name = comps_name ActionsLogic.send_update_comps(copr_chroot) if module_md_name is not None: copr_chroot.update_module_md(module_md) copr_chroot.module_md_name = module_md_name ActionsLogic.send_update_module_md(copr_chroot)