             select = (unit) =>
                 @selected_units.reset [unit]
 
-            if unit.has('department') and unit.has('municipality')
+            department = unit.get 'department'
+            municipality = unit.get 'municipality'
+            console.log typeof municipality
+            if department? and typeof department == 'object' and \
+               municipality? and typeof municipality == 'object'
                 select(unit)
             else
                 unit.fetch

                        include: 'department,municipality'
                    success: =>
                        select(unit)
        clearSelectedUnit: ->
            @selected_units.set []
        selectEvent: (event) ->

                @search_results.reset []

        render_unit: (id) ->
            @_select_unit_by_id id
        render_service: (id) ->
            console.log 'render_service', id
        render_home: ->
