From 3a86fb2c19bcfd2bc49f1b60e6d4cddb3690e27b Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 13 May 2019 08:28:00 +0200 Subject: [PATCH] Handle missing events. #257 --- app/graphql/types/event_data_edge.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graphql/types/event_data_edge.rb b/app/graphql/types/event_data_edge.rb index 313b05e0a..c7a340b66 100644 --- a/app/graphql/types/event_data_edge.rb +++ b/app/graphql/types/event_data_edge.rb @@ -10,7 +10,7 @@ class EventDataEdge < GraphQL::Relay::Edge def event_data @event_data ||= begin - Event.query(nil, subj_id: self.node[:id], obj_id: self.parent[:id])[:data].first + Event.query(nil, subj_id: self.node[:id], obj_id: self.parent[:id])[:data].first.to_h end end