Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for accessing extra_data #33

Closed
wants to merge 1 commit into from

1 participant

@ryanshow

Hey guys,

It's currently impossible to set extra data by doing something like the following:

self.storage.extra_data['foo'] = 'bar'

It's because the extra_data getter property will always return an 'anonymous' dict instance if the extra_data dict is empty.

This commit should fix that problem.

@ryanshow ryanshow closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 24, 2012
  1. Don't return an anonymous dict when accessing extra_data

    Ryan Showalter authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  formwizard/storage/base.py
View
2  formwizard/storage/base.py
@@ -40,7 +40,7 @@ def _set_current_step(self, step):
current_step = lazy_property(_get_current_step, _set_current_step)
def _get_extra_data(self):
- return self.data[self.extra_data_key] or {}
+ return self.data[self.extra_data_key]
def _set_extra_data(self, extra_data):
self.data[self.extra_data_key] = extra_data
Something went wrong with that request. Please try again.