From 32934d415d69a9978d36fd232a6230e8e66ae9b1 Mon Sep 17 00:00:00 2001 From: timbarton1966 Date: Mon, 9 Sep 2024 15:31:25 -0400 Subject: [PATCH 1/2] updated user query to select Active Standard users --- metaci/users/management/commands/packaging_org_users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metaci/users/management/commands/packaging_org_users.py b/metaci/users/management/commands/packaging_org_users.py index fe6cc19d7..8bc159881 100644 --- a/metaci/users/management/commands/packaging_org_users.py +++ b/metaci/users/management/commands/packaging_org_users.py @@ -38,7 +38,7 @@ def _handle_packaging_org(org): org_config.refresh_oauth_token(keychain=None) sf = org_config.salesforce_client users = sf.query( - "SELECT Name, Email, UserType, IsActive, Profile.Name, Title from User WHERE IsActive=True" + "SELECT Name, Email, UserType, IsActive, Profile.Name, Title from User WHERE IsActive=True AND UserType='Standard'" ) name, namespace = None, None try: From 44470ef0bf5eec9bb63c578c47f4b26942198763 Mon Sep 17 00:00:00 2001 From: Tim Barton Date: Tue, 19 Nov 2024 10:25:25 -0500 Subject: [PATCH 2/2] Update test_packaging_org_users.py updated unit test --- .../users/management/commands/tests/test_packaging_org_users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metaci/users/management/commands/tests/test_packaging_org_users.py b/metaci/users/management/commands/tests/test_packaging_org_users.py index 34ff1382a..9ac0a19de 100644 --- a/metaci/users/management/commands/tests/test_packaging_org_users.py +++ b/metaci/users/management/commands/tests/test_packaging_org_users.py @@ -25,7 +25,7 @@ def fake_query(query): raise SalesforceMalformedRequest("Q", "R", "S", "T") elif ( query - == "SELECT Name, Email, UserType, IsActive, Profile.Name, Title from User WHERE IsActive=True" + == "SELECT Name, Email, UserType, IsActive, Profile.Name, Title from User WHERE IsActive=True AND UserType='Standard'" ): return { "records": [