diff --git a/stacktask/actions/models.py b/stacktask/actions/models.py index b0dc58a..da53dea 100644 --- a/stacktask/actions/models.py +++ b/stacktask/actions/models.py @@ -514,6 +514,9 @@ class NewUserAction(UserNameAction, ProjectMixin, UserMixin): if not self.valid: return + # add to cache to use in template + self.action.task.cache['user_state'] = self.action.state + if self.action.state == "default": # default action: Create a new user in the tenant and add roles user = self.create_user(token_data['password']) @@ -888,6 +891,9 @@ class NewProjectWithUserAction(UserNameAction, ProjectMixin, UserMixin): if not self.valid: return + # add to cache to use in template + self.action.task.cache['user_state'] = self.action.state + project_id = self.get_cache('project_id') self.action.task.cache['project_id'] = project_id user_id = self.get_cache('user_id')