Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/247633
Change subject: Ignore constraints on save in ItemMergeInteractor
......................................................................
Ignore constraints on save in ItemMergeInteractor
We can safely do that as all relevant constraints have been
checked in ChangeOpsMerge already.
Bug: T115892
Change-Id: I7a1ae3ac16b135d2b0c8b37e48f673383b28e60e
---
M repo/includes/Interactors/ItemMergeInteractor.php
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/33/247633/1
diff --git a/repo/includes/Interactors/ItemMergeInteractor.php
b/repo/includes/Interactors/ItemMergeInteractor.php
index eb94607..caf4499 100644
--- a/repo/includes/Interactors/ItemMergeInteractor.php
+++ b/repo/includes/Interactors/ItemMergeInteractor.php
@@ -11,6 +11,7 @@
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\EntityContent;
use Wikibase\Lib\Store\EntityRevisionLookup;
use Wikibase\Lib\Store\EntityStore;
use Wikibase\Lib\Store\StorageException;
@@ -269,7 +270,11 @@
}
private function saveEntity( Entity $entity, Summary $summary, $bot ) {
- $flags = EDIT_UPDATE;
+ // Given we already check all constraints in ChangeOpsMerge,
it's
+ // fine to ignore them here. This is also needed to not run into
+ // the constraints we're supposed to ignore (see
ChangeOpsMerge::removeConflictsWithEntity
+ // for reference)
+ $flags = EDIT_UPDATE | EntityContent::EDIT_IGNORE_CONSTRAINTS;
if ( $bot && $this->user->isAllowed( 'bot' ) ) {
$flags |= EDIT_FORCE_BOT;
}
--
To view, visit https://gerrit.wikimedia.org/r/247633
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a1ae3ac16b135d2b0c8b37e48f673383b28e60e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits