Commit e56c01d1 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fix orphaned geo_node_key check.

parent b62a5608
......@@ -56,7 +56,7 @@ class GeoNode < ActiveRecord::Base
private
def destroy_orphaned_geo_node_key
return unless self.geo_node_key.destroyed_when_orphaned? && self.geo_node_key.orphaned?
return unless self.geo_node_key && self.geo_node_key.destroyed_when_orphaned? && self.geo_node_key.orphaned?
self.geo_node_key.destroy
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment