# -*- coding: utf-8 -*-
# Copyright (c) 2019, JINGROW
# For license information, please see license.txt


import jingrow


def execute():
	jingrow.reload_pagetype("Release Group")
	jingrow.reload_pagetype("Jingrow App")
	groups = jingrow.get_all("Release Group", filters={"public": True})
	for group in groups:
		for app in jingrow.get_pg("Release Group", group.name).apps:
			jingrow.db.set_value("Jingrow App", app.app, "public", True)
