From 3ae2dc34e88f86ed0628cf52bb8a2b6c8d1affa2 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 29 May 2014 16:50:41 +1000 Subject: [PATCH] Preventing rabl from dying if no current hub --- app/views/json/_current_hub.rabl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/json/_current_hub.rabl b/app/views/json/_current_hub.rabl index 57731d9599..7f615bb07a 100644 --- a/app/views/json/_current_hub.rabl +++ b/app/views/json/_current_hub.rabl @@ -1,6 +1,8 @@ object current_distributor attributes :name, :id -child suppliers: :producers do - extends "json/producer" +if current_distributor + child suppliers: :producers do + extends "json/producer" + end end