-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix invalid layer in value relation field #3542
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me. There is just an issue in the code layout check.
if ( !featurePair.layer() || !featurePair.layer()->isValid() ) | ||
{ | ||
CoreUtils::log( QStringLiteral( "Features Model" ), QStringLiteral( "Received invalid feature layer pair!" ) ); | ||
return tr( "Unknown title" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When title
is empty we return pair.feature().id()
Should we not be returning the same for this case too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, if the layer is invalid, I'd expect everything is broken 💥
Pull Request Test Coverage Report for Build 10072387691Details
💛 - Coveralls |
It seems there is some edge-case scenario where a referenced layer in the value relation field is not available (probably a missing layer or some other project misconfiguration ... I could not reproduce it with my projects)
Logs are indicating that
mTitleField
is empty, thus we continue toFeaturesModel::FeatureTitle
withpair->layer()
as nullptr. Seemobile/app/valuerelationfeaturesmodel.cpp
Lines 87 to 96 in dd05acc
See bug report logs for more details -> Fixes #3535