fix topic init function
This commit is contained in:
parent
ec96d69876
commit
fac59f346f
2 changed files with 4 additions and 5 deletions
|
@ -321,8 +321,8 @@ Metamaps.Backbone.init = function () {
|
|||
if (this.isNew()) {
|
||||
this.set({
|
||||
'user_id': Metamaps.Active.Mapper.id,
|
||||
'desc': '',
|
||||
'link': '',
|
||||
'desc': this.get('desc') || '',
|
||||
'link': this.get('link') || '',
|
||||
'permission': Metamaps.Active.Map ? Metamaps.Active.Map.get('permission') : 'commons'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -270,10 +270,9 @@ Metamaps.Import = {
|
|||
metacode_id: metacode.id,
|
||||
permission: topic_permission,
|
||||
defer_to_map_id: defer_to_map_id,
|
||||
desc: desc || ""
|
||||
desc: desc || "",
|
||||
link: link || ""
|
||||
})
|
||||
topic.set('desc', desc || '') // TODO why is this necessary?
|
||||
topic.set('link', link) // TODO why is this necessary?
|
||||
Metamaps.Topics.add(topic)
|
||||
|
||||
if (import_id !== null && import_id !== undefined) {
|
||||
|
|
Loading…
Reference in a new issue