jenkins-bot has submitted this change and it was merged. Change subject: Fix selection of snak values (to not select invalid values) ......................................................................
Fix selection of snak values (to not select invalid values) Don't select and save snak value when it has become invalid. Without this check, statementview is proceeding to save with a stale value, even after the value became invalid (e.g. user is continuing to select in entity selector). As far as I can tell, this seems to be the problem in T98471. Bug: T98471 Change-Id: If140ce69d5ab6bc52c8d7a9644490f5dabce75ff --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index c1405fb..f580785 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -769,6 +769,10 @@ * @return {boolean} */ isValid: function() { + if( this.$mainSnak.data( 'snakview' ) && !this.$mainSnak.data( 'snakview' ).isValid() ) { + return false; + } + if( this._qualifiers ) { var snaklistviews = this._qualifiers.value(); -- To view, visit https://gerrit.wikimedia.org/r/218386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If140ce69d5ab6bc52c8d7a9644490f5dabce75ff Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits