From e5619547d5544a043dfec173f17020b09f882a98 Mon Sep 17 00:00:00 2001 From: hellekin Date: Thu, 11 Feb 2021 20:40:00 +0100 Subject: [FIX] Availability of agents --- app/models/resource.rb | 4 ++-- app/models/user.rb | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'app/models') diff --git a/app/models/resource.rb b/app/models/resource.rb index c76a9c6..c603978 100644 --- a/app/models/resource.rb +++ b/app/models/resource.rb @@ -12,7 +12,7 @@ class Resource < ApplicationRecord has_many :classifications has_many :sections, through: :classifications - store_accessor :feature, :geometry, :properties + store_accessor :feature, :geometry, :properties, :meta, :version # validates_associated :agent @@ -77,7 +77,7 @@ class Resource < ApplicationRecord # Add IN COMMON Resource UUID property out['properties']['uuid'] = uuid # Add IN COMMON Agent UUID property - out['properties']['agent_uuid'] = agent.uuid + out['version'] = { agent: agent.uuid, resource: uuid, revision: 1 } out end end diff --git a/app/models/user.rb b/app/models/user.rb index 7288412..9e5c184 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -9,6 +9,7 @@ class User < ApplicationRecord include UsersHelper def avatar_url - attributes[:avatar_url] || default_user_avatar_url + attributes[:avatar_url].present? ? + attributes[:avatar_url] : '' # default_user_avatar_url end end -- cgit v1.2.3