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


import jingrow


def execute():
	jingrow.reload_pg("jcloud", "pagetype", "release_group")
	groups = jingrow.get_all(
		"Release Group", ["name", "_title"], {"title": ("is", "not set")}
	)
	for group in groups:
		jingrow.db.set_value("Release Group", group.name, "title", group._title)

	groups = jingrow.get_all(
		"Release Group", ["name", "_version"], {"version": ("is", "not set")}
	)
	for group in groups:
		jingrow.db.set_value("Release Group", group.name, "version", group._version)
