/check_mk/api/1.0/domain-types/folder_config/collections/all throws a HTTP 500 error

Here is the anonymised version of Check_MK’s crash report including Stacktrace:

Crash Report	

Exeption: 
	ValueError (unique identifier not set)

Traceback:   
	File "/omd/sites/prod/lib/python3/cmk/gui/wsgi/applications/rest_api.py", line 401, in _wsgi_app
		return wsgi_app(environ, start_response)
	File "/omd/sites/prod/lib/python3/cmk/gui/wsgi/applications/rest_api.py", line 205, in __call__
		wsgi_app = self.func(ParameterDict(path_args))
	File "/omd/sites/prod/lib/python3/cmk/gui/plugins/openapi/restful_objects/decorators.py", line 479, in _validating_wrapper
		response = self.func(param)
	File "/omd/sites/prod/lib/python3/cmk/gui/plugins/openapi/endpoints/folder_config.py", line 274, in list_folders
		return constructors.serve_json(_folders_collection(folders, params['show_hosts']))
	File "/omd/sites/prod/lib/python3/cmk/gui/plugins/openapi/endpoints/folder_config.py", line 311, in _folders_collection
		'id': folder.id()
	File "/omd/sites/prod/lib/python3/cmk/gui/watolib/hosts_and_folders.py", line 131, in id
		raise ValueError("unique identifier not set")

I hope this helps. Cheers