diff --git a/app/presenters/aspect_presenter.rb b/app/presenters/aspect_presenter.rb index 726ec505a..facf4d398 100644 --- a/app/presenters/aspect_presenter.rb +++ b/app/presenters/aspect_presenter.rb @@ -11,13 +11,12 @@ class AspectPresenter < BasePresenter } end - def as_api_json(full=false) + def as_api_json(full=false, with_order: true) values = { - id: @aspect.id, - name: @aspect.name, - order: @aspect.order_id + id: @aspect.id, + name: @aspect.name } - + values[:order] = @aspect.order_id if with_order values[:chat_enabled] = @aspect.chat_enabled if full values end diff --git a/app/presenters/person_presenter.rb b/app/presenters/person_presenter.rb index 70f260362..ee0d495f5 100644 --- a/app/presenters/person_presenter.rb +++ b/app/presenters/person_presenter.rb @@ -103,7 +103,7 @@ class PersonPresenter < BasePresenter return [] unless current_user_person_contact aspects_for_person = current_user.aspects_with_person(@presentable) - aspects_for_person.map {|a| AspectPresenter.new(a).as_api_json(false) } + aspects_for_person.map {|a| AspectPresenter.new(a).as_api_json(false, with_order: false) } end def person_is_following_current_user