From 482c27c58256b24fd654ec12917d936459a405d2 Mon Sep 17 00:00:00 2001 From: Tim Simpson Date: Fri, 16 Mar 2012 13:31:37 -0500 Subject: [PATCH] Adding getattr and setattr back to fix the bug I just added. --- reddwarf/common/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reddwarf/common/models.py b/reddwarf/common/models.py index 99185dd6b0..7a6e34e189 100644 --- a/reddwarf/common/models.py +++ b/reddwarf/common/models.py @@ -45,6 +45,12 @@ class ModelBase(object): # self._validate() return self.errors == {} + def __setitem__(self, key, value): + setattr(self, key, value) + + def __getitem__(self, key): + return getattr(self, key) + def __eq__(self, other): if not hasattr(other, 'id'): return False