jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/395006 )

Change subject: Let cirrus knows that the field is empty
......................................................................


Let cirrus knows that the field is empty

Because of the noop detection strategy if the field is not provided
elastic will do minimal effort and won't update the document.
This should fix inconsistencies when the user deletes the last descriptions.

Bug: T180382
Change-Id: I8e84d23e8087355e6fe830cd6c3544292e702834
---
M repo/includes/Content/EntityHandler.php
1 file changed, 1 insertion(+), 5 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/repo/includes/Content/EntityHandler.php 
b/repo/includes/Content/EntityHandler.php
index 9daf89e..fa31219 100644
--- a/repo/includes/Content/EntityHandler.php
+++ b/repo/includes/Content/EntityHandler.php
@@ -760,11 +760,7 @@
                        $fields = $this->fieldDefinitions->getFields();
 
                        foreach ( $fields as $fieldName => $field ) {
-                               $data = $field->getFieldData( $entity );
-                               if ( $data !== null && $data !== [] ) {
-                                       // We treat null and [] as no data, but 
0, "0" etc. is OK
-                                       $fieldsData[$fieldName] = $data;
-                               }
+                               $fieldsData[$fieldName] = $field->getFieldData( 
$entity );
                        }
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/395006
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e84d23e8087355e6fe830cd6c3544292e702834
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: DCausse <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to