Skip to content

Commit

Permalink
Fix Has Repeated Field Assertion (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBColton authored Aug 29, 2020
1 parent edbd2cf commit 7bc855c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Models/MessageModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ QVariant MessageModel::dataInternal(const QModelIndex &index, int role) const {
}

// If the field has't been initialized return an invalid QVariant. (see QVariant.isValid())
if (NO_DEFAULT && !refl->HasField(*_protobuf, field)) return QVariant();
if (NO_DEFAULT && !field->is_repeated() && !refl->HasField(*_protobuf, field)) return QVariant();

switch (field->cpp_type()) {
case CppType::CPPTYPE_MESSAGE: R_EXPECT(false, QVariant()) << "The requested field " << index << " is a message";
Expand Down

0 comments on commit 7bc855c

Please sign in to comment.