actions: Move part into zerver.lib.users.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit ab04068294)
This commit is contained in:
Anders Kaseorg
2022-04-14 14:43:58 -07:00
committed by Tim Abbott
parent b8567d8d8f
commit b60ba10351
4 changed files with 9 additions and 6 deletions

View File

@@ -611,3 +611,7 @@ def get_raw_user_data(
custom_profile_field_data=custom_profile_field_data,
)
return result
def get_active_bots_owned_by_user(user_profile: UserProfile) -> QuerySet:
return UserProfile.objects.filter(is_bot=True, is_active=True, bot_owner=user_profile)