Schema alignment dialog box was broken by recon refactoring.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1050 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-06-28 23:02:17 +00:00
parent 59fe9e35bd
commit 7a914f01e8

View File

@ -10,7 +10,10 @@ SchemaAlignment.autoAlign = function() {
for (var c = 0; c < columns.length; c++) { for (var c = 0; c < columns.length; c++) {
var column = columns[c]; var column = columns[c];
var typed = "reconConfig" in column && column.reconConfig !== null; var typed = (column.reconConfig) &&
ReconciliationManager.isFreebaseId(column.reconConfig.identifierSpace) &&
ReconciliationManager.isFreebaseId(column.reconConfig.schemaSpace);
var candidate = { var candidate = {
status: "unbound", status: "unbound",
typed: typed, typed: typed,
@ -101,7 +104,11 @@ SchemaAlignment.createNewRootNode = function() {
columnName: column.name, columnName: column.name,
createForNoReconMatch: true createForNoReconMatch: true
}; };
if ("reconConfig" in column && column.reconConfig !== null) { if ((column.reconConfig) &&
ReconciliationManager.isFreebaseId(column.reconConfig.identifierSpace) &&
ReconciliationManager.isFreebaseId(column.reconConfig.schemaSpace) &&
(column.reconConfig.type)) {
target.type = { target.type = {
id: column.reconConfig.type.id, id: column.reconConfig.type.id,
name: column.reconConfig.type.name name: column.reconConfig.type.name