Skip to content

Commit

Permalink
Update activity_serializer.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
sarala committed Feb 5, 2020
1 parent c663784 commit 49f558c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/serializers/activity_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ActivitySerializer
end

attribute "prov:wasAttributedTo" do |object|
return nil if object.username.blank?
url = Rails.env.production? ? "https://api.datacite.org" : "https://api.test.datacite.org"
object.username.include?(".") ? url + "/clients/" + object.username : url + "/providers/" + object.username
end
Expand Down

0 comments on commit 49f558c

Please sign in to comment.