Fix server mode.

This commit is contained in:
Adam Treat 2023-06-27 15:01:16 -04:00
parent b56cc61ca2
commit 189ac82277

View File

@ -284,7 +284,7 @@ QHttpServerResponse Server::handleCompletionRequest(const QHttpServerRequest &re
// load the new model if necessary // load the new model if necessary
setShouldBeLoaded(true); setShouldBeLoaded(true);
if (!modelInfo.name.isEmpty()) { if (modelInfo.filename.isEmpty()) {
std::cerr << "ERROR: couldn't load default model " << modelRequested.toStdString() << std::endl; std::cerr << "ERROR: couldn't load default model " << modelRequested.toStdString() << std::endl;
return QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest); return QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest);
} else if (!loadModel(modelInfo)) { } else if (!loadModel(modelInfo)) {