Permalink
Browse files

Use update instead of setting key directly

  • Loading branch information...
1 parent d3c4a5c commit 6032fb8eb10a2f6be28142c7473e03b4bc349c7c @paltman paltman committed Nov 5, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 partitions/registry.py
View
@@ -18,7 +18,11 @@ def register(self, key, app_model, expression):
if app_model.split(".")[0] not in settings.INSTALLED_APPS:
raise Exception("'%s' is not in INSTALLED_APPS" % app_model.split(".")[0])
- self._partitions[key].update({app_model: expression})
+ self._partitions.update({
+ key: {
+ app_model: expression
+ }
+ })
def expression_for(self, key, app_model):
return self._partitions.get(key, {}).get(app_model)

0 comments on commit 6032fb8

Please sign in to comment.