You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/12/10 15:01:00 UTC
[1/2] git commit: CIMI: Be more carefull when removing persistence
data about entity (DTACLOUD-395)
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 <mf...@redhat.com>
Authored: Mon Dec 10 10:53:02 2012 +0100
Committer: Michal fojtik <mf...@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)