Diferencia entre revisiones de «Módulo:Wikidata»

La propiedad tiene que ser un valor válido
Comprobación de que proporciona un valor de propiedad válido
Línea 224: Línea 224:
if declaracion then
if declaracion then
tablaOrdenada = declaracion
tablaOrdenada = declaracion
elseif mw.wikibase.isValidEntityId(tostring(opciones.entityId)) then
elseif mw.wikibase.isValidEntityId(tostring(opciones.entityId)) and mw.wikibase.isValidEntityId(tostring(propiedad)) then
tablaOrdenada = mw.wikibase.getAllStatements( opciones.entityId, mw.ustring.upper(propiedad) )
tablaOrdenada = mw.wikibase.getAllStatements( opciones.entityId, mw.ustring.upper(propiedad) )
else
else