Hello I'm trying to enroll users via invitation. During flow my stages work as expected.
- Invitation.
- Prompt.
- User Write Fails traceback below
I have a couple of policies attached to the prompt. One sets the username as email my other one sets groups based on the invitation link.
However I keep getting this failure. Should be known that I accidently deleted all groups earlier and restored them according to the documentation.
Traceback (most recent call last): File "/authentik/flows/views/executor.py", line 296, in get stage_response = self.current_stage_view.get(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/authentik/stages/user_write/stage.py", line 140, in get self.update_user(user) File "/authentik/stages/user_write/stage.py", line 97, in update_user elif hasattr(user, key) and not key.startswith("attributes."): ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/fields/related_descriptors.py", line 588, in __get__ return self.related_manager_cls(instance) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/fields/related_descriptors.py", line 974, in __init__ raise ValueError( builtins.ValueError: "<User: >" needs to have a value for field "id" before this many-to-many relationship can be used.