deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: [Core] - make sure realms.resource_types is never nil - DTACLOUD-460
Date Mon, 11 Feb 2013 14:46:31 GMT
Updated Branches:
  refs/heads/master 8c8bc1ccf -> 5c67f4e43


[Core] - make sure realms.resource_types is never nil - DTACLOUD-460

https://issues.apache.org/jira/browse/DTACLOUD-460


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

Branch: refs/heads/master
Commit: 5c67f4e4340758dc071301d37f4423b7d73f887d
Parents: 8c8bc1c
Author: marios <marios@redhat.com>
Authored: Mon Feb 11 16:44:19 2013 +0200
Committer: marios <marios@redhat.com>
Committed: Mon Feb 11 16:46:09 2013 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/models/realm.rb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5c67f4e4/server/lib/deltacloud/models/realm.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/models/realm.rb b/server/lib/deltacloud/models/realm.rb
index 1c25ba2..ce1ac26 100644
--- a/server/lib/deltacloud/models/realm.rb
+++ b/server/lib/deltacloud/models/realm.rb
@@ -22,6 +22,11 @@ class Realm < BaseModel
   attr_accessor :state
   attr_accessor :resource_types
 
+  def initialize(init=nil)
+    super(init)
+    self.resource_types ||= []
+  end
+
   def to_hash(context)
     r = {
       :id => self.id,


Mime
View raw message