1
0
forked from BRT/arc

Add validation to ensure device.name is not empty before registering a new device in API sync logic.

This commit is contained in:
slava 2026-04-09 22:32:58 +07:00
parent 87d74e7747
commit 0c1d2675b3

View File

@ -382,7 +382,7 @@ void DeviceScreener::start() {
// Синхронизация с API
DeviceInfo saved = DeviceDAO::getDeviceById(device.id);
if (saved.apiId.isEmpty()) {
if (saved.apiId.isEmpty() && !device.name.isEmpty()) {
// Устройство ещё не зарегистрировано — создаём
const QString apiId = createDeviceOnApi(device);
if (!apiId.isEmpty()) {