mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
adding a size check on amount of communities requested
This commit is contained in:
parent
8fca0b7aca
commit
1e03afe36e
1 changed files with 6 additions and 0 deletions
|
@ -275,6 +275,12 @@ def admin_federation():
|
||||||
|
|
||||||
# get the community urls to join
|
# get the community urls to join
|
||||||
community_urls_to_join = []
|
community_urls_to_join = []
|
||||||
|
|
||||||
|
# if the admin user wants more added than we have, then just add all of them
|
||||||
|
if communities_to_add > len(parsed_communities_sorted):
|
||||||
|
communities_to_add = len(parsed_communities_sorted)
|
||||||
|
|
||||||
|
# make the list of urls
|
||||||
for i in range(communities_to_add):
|
for i in range(communities_to_add):
|
||||||
community_urls_to_join.append(parsed_communities_sorted[i]['url'])
|
community_urls_to_join.append(parsed_communities_sorted[i]['url'])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue