fix for when mappings are corrupt

This commit is contained in:
Connor Turland 2014-11-11 07:23:44 -05:00
parent 8d3de3867f
commit f1135854a0

View file

@ -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()