diff --git a/src/caosdb/entity.cpp b/src/caosdb/entity.cpp index 24fd3824aa20c35a253f4cdd6d2020e180e1a1c7..57935d1cb7bd7565a2d64d8b22b2f761246f600a 100644 --- a/src/caosdb/entity.cpp +++ b/src/caosdb/entity.cpp @@ -75,6 +75,8 @@ Entity::Entity() : wrapped(Entity::CreateProtoEntity()) { properties.wrapped = this->wrapped->mutable_properties(); parents.wrapped = this->wrapped->mutable_parents(); errors.wrapped = this->wrapped->mutable_errors(); + warnings.wrapped = this->wrapped->mutable_warnings(); + infos.wrapped = this->wrapped->mutable_infos(); } Entity::Entity(IdResponse *idResponse) : Entity() { diff --git a/test/test_entity.cpp b/test/test_entity.cpp index 7914eeb1ae45991ce3265ead21fa475a7d3bf98a..57bc8cfdae1cb48e8d943c5da3a53deaeb612020 100644 --- a/test/test_entity.cpp +++ b/test/test_entity.cpp @@ -103,6 +103,7 @@ TEST(test_entity, test_from_id_response) { // NOLINT std::cout << other_ent.ToString() << std::endl; EXPECT_EQ(other_ent.GetId(), "other_entity_id"); + std::cout << other_ent.GetWarnings().Size(); EXPECT_EQ(other_ent.GetWarnings().Size(), 1); EXPECT_EQ(other_ent.GetWarnings().At(0).GetDescription(), "warning_desc"); EXPECT_EQ(other_ent.GetWarnings().At(0).GetCode(),