deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [1/2] git commit: CIMI: Be more carefull when removing persistence data about entity (DTACLOUD-395)
Date Mon, 10 Dec 2012 14:01:00 GMT
Updated Branches:
  refs/heads/master 75dc613f6 -> 1a1705079


CIMI: Be more carefull when removing persistence data about entity (DTACLOUD-395)


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/5967a999
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/5967a999
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/5967a999

Branch: refs/heads/master
Commit: 5967a99908f496ae53844d00c0861f8410ee8f1c
Parents: 75dc613
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Dec 10 10:53:02 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Dec 10 15:00:34 2012 +0100

----------------------------------------------------------------------
 server/lib/db.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5967a999/server/lib/db.rb
----------------------------------------------------------------------
diff --git a/server/lib/db.rb b/server/lib/db.rb
index e6fe761..ef83462 100644
--- a/server/lib/db.rb
+++ b/server/lib/db.rb
@@ -48,7 +48,8 @@ module Deltacloud
 
       def delete_attributes_for(model)
         return if test_environment?
-        get_entity(model).destroy
+        entity = get_entity(model)
+        !entity.nil? && entity.destroy!
       end
 
       def get_entity(model)


Mime
View raw message