You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The get_default_is_active function is invoked at multiple points during user model instantiation, due to its use in field definitions and synchronization with Stormpath accounts. In its access of the underlying Stormpath Python SDK's application object and connected resources, this function assumes that the application's default account store is a Directory:
If, however, one has mapped the default account store for one's application to an Organization instead of a Directory in one's Stormpath dashboard, the resource object assigned to the directory variable will actually be an instance of the Organization class. Unlike the Directory class, instances of Organization lack an account_creation_policy attribute, leading to the aforementioned AttributeError: "Organization has no attribute 'account_creation_policy'"
I have tried a few different approaches to user model object creation, including get_user_model().objects.create(…) and get_user_model()(is_active=True) (since the definition of the is_active field is one of the places where get_default_is_active is called). All such user model instantiation ends in the same place: AttributeError.
The text was updated successfully, but these errors were encountered:
The
get_default_is_active
function is invoked at multiple points during user model instantiation, due to its use in field definitions and synchronization with Stormpath accounts. In its access of the underlying Stormpath Python SDK's application object and connected resources, this function assumes that the application's default account store is a Directory:If, however, one has mapped the default account store for one's application to an Organization instead of a Directory in one's Stormpath dashboard, the resource object assigned to the
directory
variable will actually be an instance of theOrganization
class. Unlike theDirectory
class, instances ofOrganization
lack anaccount_creation_policy
attribute, leading to the aforementionedAttributeError
: "Organization has no attribute 'account_creation_policy'"I have tried a few different approaches to user model object creation, including
get_user_model().objects.create(…)
andget_user_model()(is_active=True)
(since the definition of theis_active
field is one of the places whereget_default_is_active
is called). All such user model instantiation ends in the same place:AttributeError
.The text was updated successfully, but these errors were encountered: