check also grup table for group url if no node server entry exist

This commit is contained in:
Dario 2020-11-30 09:51:04 +01:00 committed by Ulf Gebhardt
parent da0c77827f
commit 7230a07085
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 11 additions and 2 deletions

View File

@ -8,6 +8,7 @@
#include "../SingletonManager/SingletonTaskObserver.h"
#include "NodeServer.h"
#include "Group.h"
#include "../lib/DataTypeConverter.h"
@ -529,7 +530,14 @@ namespace controller {
auto model = getModel();
if (!model->getGroupId()) return ServerConfig::g_php_serverPath;
auto servers = controller::NodeServer::load(model::table::NODE_SERVER_GRADIDO_COMMUNITY, model->getGroupId());
if (!servers.size()) return ServerConfig::g_php_serverPath;
if (!servers.size()) {
auto group = controller::Group::load(model->getGroupId());
if (!group.isNull()) {
mGroupBaseUrl = group->getModel()->getUrl();
return mGroupBaseUrl;
}
return ServerConfig::g_php_serverPath;
}
if (servers.size() > 1) {
auto em = ErrorManager::getInstance();
em->addError(new ParamError(function_name, "error, more than one community server found for group", model->getGroupId()));

View File

@ -140,7 +140,8 @@ int HederaTask::tryQueryReceipt()
}
else {
if (response.getResponseCode() == proto::NOT_SUPPORTED) {
addError(new ParamError(function_name, "query in json-format:", query->toJsonString()));
//query->toJsonString()
return -3;
}
mLastCheck = Poco::Timestamp();