Select to view content in your preferred language

membership_access paramenter in groups.create() method doesn't honor 'none'/None option

469
1
Jump to solution
11-29-2023 03:06 PM
SFM_TravisBott
Frequent Contributor

I have a script that ingests a csv of jurisdictions and creates groups/apps based on that list. I am running into an issue with one of the parameters of the groups.create() method: the memebership_access parameter isn't honored.

The documentation says it will take will take 'org', 'collaboration', and 'none' as optional strings (and the documentation is itself confused, because in the example script it uses None, which is quite different). 

The docs says 'none' is the default, but it isn't. If no argument is given it defaults to org. Calling 'collaboration' works. However, calling 'none' (or None, as I've tried both) does not work

A code snippet:

j = 'Riverside5'
print('\nCreating group for '+ j + '...')

newGroup = gis.groups.create(title = 'FHSZ LRA - ' + j, tags = tagsList, snippet = groupSnippetText, access = 'private', display_settings = 'apps', is_invitation_only = 'True', sort_order = 'desc', thumbnail = groupThumbnailURL, membership_access='none')

print('Group created. Group ID: '+ newGroup.id)

 

The result stays here:

SFM_TravisBott_0-1701299081979.png

 

The intention of the script is to assist in the creation of hundreds of groups. Not being able to specify this setting is a considerable problem. 

0 Kudos
1 Solution
1 Reply