fix for when mappings are corrupt
This commit is contained in:
parent
8d3de3867f
commit
f1135854a0
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ class MapsController < ApplicationController
|
|||
elsif m.category == "Topic"
|
||||
object = m.topic
|
||||
end
|
||||
object.permission == "private" && (!authenticated? || (authenticated? && @current.id != object.user_id))
|
||||
!object || (object.permission == "private" && (!authenticated? || (authenticated? && @current.id != object.user_id)))
|
||||
}
|
||||
|
||||
respond_with(@allmappers, @allmappings, @allsynapses, @alltopics, @map)
|
||||
|
@ -117,7 +117,7 @@ class MapsController < ApplicationController
|
|||
elsif m.category == "Topic"
|
||||
object = m.topic
|
||||
end
|
||||
object.permission == "private" && (!authenticated? || (authenticated? && @current.id != object.user_id))
|
||||
!object || (object.permission == "private" && (!authenticated? || (authenticated? && @current.id != object.user_id)))
|
||||
}
|
||||
|
||||
@json = Hash.new()
|
||||
|
|
Loading…
Reference in a new issue