# Copyright (c) 2022, SolutionERP LLC and Contributors
# See license.txt

import xhiveframework
from xhiveframework.tests.utils import XhiveframeworkTestCase


class TestWorkstationType(XhiveframeworkTestCase):
	pass


def create_workstation_type(**args):
	args = xhiveframework._dict(args)

	if workstation_type := xhiveframework.db.exists("Workstation Type", args.workstation_type):
		return xhiveframework.get_doc("Workstation Type", workstation_type)
	else:
		doc = xhiveframework.new_doc("Workstation Type")
		doc.update(args)
		doc.insert()
		return doc
