fix: synapse import fails if synapses are missing desc

This commit is contained in:
Devin Howard 2016-08-07 17:18:54 +08:00
parent a6951920eb
commit 23543ac7ad

View file

@ -272,7 +272,7 @@ Metamaps.Import = {
name: name, name: name,
metacode_id: metacode.id, metacode_id: metacode.id,
permission: permission || Metamaps.Active.Map.get('permission'), permission: permission || Metamaps.Active.Map.get('permission'),
desc: desc, desc: desc || "",
link: link link: link
}) })
Metamaps.Topics.add(topic) Metamaps.Topics.add(topic)
@ -292,7 +292,7 @@ Metamaps.Import = {
Metamaps.Famous.viz.hideInstructions() Metamaps.Famous.viz.hideInstructions()
}, },
createSynapseWithParameters: function (description, category, permission, createSynapseWithParameters: function (desc, category, permission,
topic1, topic2) { topic1, topic2) {
var node1 = topic1.get('node') var node1 = topic1.get('node')
var node2 = topic2.get('node') var node2 = topic2.get('node')
@ -303,7 +303,7 @@ Metamaps.Import = {
} // if } // if
var synapse = new Metamaps.Backbone.Synapse({ var synapse = new Metamaps.Backbone.Synapse({
desc: description, desc: desc || "",
category: category, category: category,
permission: permission, permission: permission,
node1_id: topic1.id, node1_id: topic1.id,