diff --git a/services/backup/docker-server/contents/server/src/DatabaseManager.cpp b/services/backup/docker-server/contents/server/src/DatabaseManager.cpp --- a/services/backup/docker-server/contents/server/src/DatabaseManager.cpp +++ b/services/backup/docker-server/contents/server/src/DatabaseManager.cpp @@ -103,7 +103,10 @@ if (items.empty()) { return nullptr; } - return std::make_shared(items[0]); + std::shared_ptr result = + std::make_shared(); + result->assignItemFromDatabaseUserIDCreatedIndex(items[0]); + return result; } void DatabaseManager::removeBackupItem(std::shared_ptr item) { @@ -126,9 +129,11 @@ request.AddItem( LogItem::FIELD_VALUE, Aws::DynamoDB::Model::AttributeValue(item.getValue())); - request.AddItem( - LogItem::FIELD_ATTACHMENT_HOLDERS, - Aws::DynamoDB::Model::AttributeValue(item.getAttachmentHolders())); + if (!item.getAttachmentHolders().empty()) { + request.AddItem( + LogItem::FIELD_ATTACHMENT_HOLDERS, + Aws::DynamoDB::Model::AttributeValue(item.getAttachmentHolders())); + } this->innerPutItem(std::make_shared(item), request); }