From 49afcd5855d6610e41c1bdab0f99f2a8698f686a Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Tue, 22 May 2018 10:50:57 +0200 Subject: [PATCH] Sync: Only prefetch relations for IcingaObject So DatalistEntry can be synced fixes #1048 --- library/Director/Import/Sync.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Director/Import/Sync.php b/library/Director/Import/Sync.php index 715d7660..0c03f5ce 100644 --- a/library/Director/Import/Sync.php +++ b/library/Director/Import/Sync.php @@ -816,7 +816,10 @@ class Sync { PrefetchCache::initialize($this->db); - IcingaObject::prefetchAllRelationsByType($this->rule->object_type, $this->db); + $dummy = IcingaObject::createByType($this->rule->object_type); + if ($dummy instanceof IcingaObject) { + IcingaObject::prefetchAllRelationsByType($this->rule->object_type, $this->db); + } return $this; }