From b63e7145e91057ce042a868d62b50bb6507cb4b9 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 17 Mar 2016 20:54:29 +0100 Subject: Fixed operations on accounts and resources --- common/store.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/store.cpp b/common/store.cpp index bedbc47..4bf1c58 100644 --- a/common/store.cpp +++ b/common/store.cpp @@ -116,7 +116,15 @@ QSharedPointer Store::loadModel(Query query) template static std::shared_ptr> getFacade(const QByteArray &resourceInstanceIdentifier) { - if (auto facade = FacadeFactory::instance().getFacade(resourceName(resourceInstanceIdentifier), resourceInstanceIdentifier)) { + + const auto type = ApplicationDomain::getTypeName(); + if (type == "sinkresource" || type == "sinkaccount") { + if (auto facade = FacadeFactory::instance().getFacade("", "")) { + return facade; + } + } + const auto resourceType = resourceName(resourceInstanceIdentifier); + if (auto facade = FacadeFactory::instance().getFacade(resourceType, resourceInstanceIdentifier)) { return facade; } return std::make_shared>(); -- cgit v1.2.3