diff --git a/include/caosdb/entity.h b/include/caosdb/entity.h index 4d4215544190d17aee2e187a403a47292d57650a..32722a843e0724e768d4e05d531206052e7a12de 100644 --- a/include/caosdb/entity.h +++ b/include/caosdb/entity.h @@ -707,7 +707,9 @@ public: : static_cast<ProtoDataType *>(nullptr)) { properties.wrapped = this->wrapped->mutable_properties(); parents.wrapped = this->wrapped->mutable_parents(); - file_descriptor.wrapped = this->wrapped->mutable_file_descriptor(); + if(this->wrapped->has_file_descriptor()) { + file_descriptor.wrapped = this->wrapped->mutable_file_descriptor(); + } }; explicit inline Entity(EntityResponse *response) : Entity(response->mutable_entity()) { this->errors.wrapped->Swap(response->mutable_errors()); diff --git a/test/test_data_type.cpp b/test/test_data_type.cpp index bccc853e283cb00fd6fd1b40838f5a8ac1faae64..02861d3baabbab2aee6fead973245029379db662 100644 --- a/test/test_data_type.cpp +++ b/test/test_data_type.cpp @@ -25,15 +25,9 @@ #include "caosdb/entity/v1/main.pb.h" // for DataType, Ato... #include "caosdb/logging.h" // for CAOSDB_LOG_DEBUG #include "caosdb/protobuf_helper.h" // for CAOSDB_DEBUG_... -#include <boost/log/core/record.hpp> // for record -#include <boost/log/detail/attachable_sstream_buf.hpp> // for basic_ostring... -#include <boost/log/sources/record_ostream.hpp> // for operator<< -#include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_... -#include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_... #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test -#include <iosfwd> // for streamsize #include <map> // for map, operator!= #include <string> // for allocator #include <utility> // for pair