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
I am getting this error when trying to access the view list in the admin panel: AttributeError, as no selected provider is selected when I try to access the providers list!!
'NoneType' object has no attribute 'company'
rules:
import rules
@rules.predicate
def is_company_agent(user, provider):
return provider.company == user
# Permissions setup for Provider model
rules.add_perm('users.change_provider', is_company_agent)
rules.add_perm('users.delete_provider', is_company_agent)
rules.add_perm('users.view_provider', is_company_agent)
admin code:
@admin.register(Provider)
class ProviderAdmin(ObjectPermissionsModelAdmin):
The text was updated successfully, but these errors were encountered:
I am getting this error when trying to access the view list in the admin panel: AttributeError, as no selected provider is selected when I try to access the providers list!!
'NoneType' object has no attribute 'company'
rules:
admin code:
The text was updated successfully, but these errors were encountered: