diff --git a/app/javascript/gobierto_data/webapp/components/commons/Queries.vue b/app/javascript/gobierto_data/webapp/components/commons/Queries.vue
index 90434fd630..12afba5a15 100644
--- a/app/javascript/gobierto_data/webapp/components/commons/Queries.vue
+++ b/app/javascript/gobierto_data/webapp/components/commons/Queries.vue
@@ -58,7 +58,7 @@
{{ name }}
+
+
+
+ {{ author }}
+
diff --git a/app/serializers/gobierto_data/query_serializer.rb b/app/serializers/gobierto_data/query_serializer.rb
index ba8ffa92be..a119132202 100644
--- a/app/serializers/gobierto_data/query_serializer.rb
+++ b/app/serializers/gobierto_data/query_serializer.rb
@@ -4,10 +4,10 @@ module GobiertoData
class QuerySerializer < ActiveModel::Serializer
include Rails.application.routes.url_helpers
- attributes :id
+ attributes :id, :privacy_status, :sql, :dataset_id, :user_id, :author
attribute :name, unless: :with_translations?
attribute :name_translations, if: :with_translations?
- attributes :privacy_status, :sql, :dataset_id, :user_id
+
belongs_to :dataset, unless: :exclude_relationships?
belongs_to :user, unless: :exclude_relationships?
has_many :visualizations, unless: :exclude_relationships?
@@ -20,6 +20,10 @@ class QuerySerializer < ActiveModel::Serializer
}
end
+ def author
+ object.user.name
+ end
+
def current_site
Site.find(object.site.id)
end