Fix issue where Wikidata edits were not happening (#1682)

* Added logs to debug wikidata edits

* Minor changes in logs
This commit is contained in:
Vivek Maskara 2018-07-05 15:43:37 +05:30 committed by Josephine Lim
parent 306f23d1e2
commit b2a150a3ae
10 changed files with 55 additions and 9 deletions

View file

@ -0,0 +1,5 @@
package fr.free.nrw.commons.wikidata;
public class WikidataConstants {
public static final String WIKIDATA_ENTITY_ID_PREF = "WikiDataEntityId";
}

View file

@ -48,10 +48,16 @@ public class WikidataEditService {
* @param fileName
*/
public void createClaimWithLogging(String wikidataEntityId, String fileName) {
if(wikidataEntityId == null
|| fileName == null) {
if(wikidataEntityId == null) {
Timber.d("Skipping creation of claim as Wikidata entity ID is null");
return;
}
if(fileName == null) {
Timber.d("Skipping creation of claim as fileName entity ID is null");
return;
}
editWikidataProperty(wikidataEntityId, fileName);
}