Project

General

Profile

Bug #6858

AttributeError when, logged in, accessing homepage

Added by Serghei Mihai almost 5 years ago. Updated almost 5 years ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
30 Mar 2015
Due date:
% Done:

100%

Patch proposed:
No
Planning:
No

Description

After logging in and returning to homepage the following error occurs:

Exception Value: 'bool' object has no attribute 'enabled'
Exception Location:    /usr/lib/python2.7/dist-packages/authentic2/saml/common.py in get_sp_options_policy, line 680

Associated revisions

Revision 8a285ab8 (diff)
Added by Benjamin Dauvergne almost 5 years ago

Fix typo in get_sp_options_policy_default() (fixes #6858)

Revision 3b604e9a (diff)
Added by Benjamin Dauvergne almost 5 years ago

Fix typo in get_sp_options_policy_default() (fixes #6858)

History

#1 Updated by Serghei Mihai almost 5 years ago

In the following code:

def get_sp_options_policy(provider):
    policy = get_sp_options_policy_all()
    if policy:
        return policy
    if provider.service_provider.enable_following_sp_options_policy:
        policy = provider.service_provider.enable_following_sp_options_policy
        if policy and policy.enabled:
            return provider.service_provider.sp_options_policy
    return get_sp_options_policy_default()

the provider.service_provider.enable_following_sp_options_policy line checks the boolean attribute of LibertyServiceProvider model.
I guess there is a typo error in the if policy and policy.enabled: condition

#2 Updated by Frédéric Péters almost 5 years ago

- policy = provider.service_provider.enable_following_sp_options_policy
+ policy = provider.service_provider.sp_options_policy

#3 Updated by Benjamin Dauvergne almost 5 years ago

  • Status changed from Nouveau to Résolu (à déployer)
  • % Done changed from 0 to 100

#4 Updated by Benjamin Dauvergne almost 5 years ago

  • Assignee set to Benjamin Dauvergne
  • Target version set to 2.2.0

#6 Updated by Benjamin Dauvergne almost 5 years ago

  • Target version changed from 2.2.0 to 2.1.14

#7 Updated by Benjamin Dauvergne almost 5 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF