Skip to content

ak_call_policy calls always error #9010

@devSparkle

Description

@devSparkle

Describe the bug
Any attempts to call another policy through ak_call_policy throw the following error:

 'NoneType' object has no attribute 'pk'

To Reproduce
Steps to reproduce the behavior:

  1. Create a policy named test-policy with the following expression:
return True
  1. Create a second policy with the following expression:
result = ak_call_policy("test-policy")

return True
  1. Run the policy on any object, through the "Test" action button.

Expected behavior
The test-policy should be called, and return a PolicyResult object as described here.

Version and Deployment (please complete the following information):

  • authentik version: 2024.2.2
  • Deployment: docker-compose

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions