From 46363b392bb190c5810a8bf15177857a65196dc1 Mon Sep 17 00:00:00 2001
From: Pieter Frenssen <pieter@frenssen.be>
Date: Fri, 18 Jan 2013 20:08:24 +0100
Subject: [PATCH] Issue #1689692 follow-up by pfrenssen: Do not save domains
 with an invalid id when reverting Features.

---
 domain.features.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/domain.features.inc b/domain.features.inc
index efe13dd..95d1ef0 100644
--- a/domain.features.inc
+++ b/domain.features.inc
@@ -75,8 +75,8 @@ function domain_features_rebuild($module) {
     foreach ($defaults as $key => $domain) {
       if ($id = domain_load_domain_id($key)) {
         $domain['domain_id'] = $id;
+        domain_save($domain, $domain);
       }
-      domain_save($domain, $domain);
     }
   }
 }
-- 
1.8.1

