X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/17d46134395cc0584ed6ba54b69e47490dc5b6a9..16c91c1902f065c6d9b12a5c89c04d6aef620291:/contrib/waldo/models.py?ds=sidebyside diff --git a/contrib/waldo/models.py b/contrib/waldo/models.py index e3dd079..c537ba9 100644 --- a/contrib/waldo/models.py +++ b/contrib/waldo/models.py @@ -379,18 +379,9 @@ class AccountMultiView(LoginMultiView): return self.manage_account_page.render_to_response(request, extra_context=context) def has_valid_account(self, user): - user_form, profile_form = self.get_account_forms() - forms = [] - forms.append(user_form(data=get_field_data(user, self.user_fields))) - - if profile_form is not None: - profile = self.account_profile._default_manager.get_or_create(user=user)[0] - forms.append(profile_form(data=get_field_data(profile, self.account_profile_fields))) - - for form in forms: - if not form.is_valid(): - return False - return True + form = self.account_form(user, {}) + form.data = form.initial + return form.is_valid() def account_required(self, view): def inner(request, *args, **kwargs):