From 69cb1d6966c347b9e45e013845d893382ce81fdf Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 10 Mar 2019 20:16:05 +0100 Subject: [PATCH] fix delegation error. #213. Fixes LUPO-6. --- app/models/activity.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/activity.rb b/app/models/activity.rb index 632db7da4..58d7004a1 100644 --- a/app/models/activity.rb +++ b/app/models/activity.rb @@ -168,7 +168,7 @@ def as_indexed_json(options={}) "request_uuid" => request_uuid, "changes" => changes, "created" => created, - "doi" => doi.as_indexed_json + "doi" => doi.present? ? doi.as_indexed_json : nil } end