mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Avoid error caused by fstab.sh admin with a http:// URL
This commit is contained in:
parent
64c40b11db
commit
dfce93202e
1 changed files with 8 additions and 6 deletions
|
@ -283,8 +283,10 @@ def register(app):
|
|||
instance_data = response.json()
|
||||
admin_profile_ids = []
|
||||
for admin in instance_data['admins']:
|
||||
admin_profile_ids.append(admin['person']['actor_id'].lower())
|
||||
user = find_actor_or_create(admin['person']['actor_id'])
|
||||
profile_id = admin['person']['actor_id']
|
||||
if profile_id.startswith('https://'):
|
||||
admin_profile_ids.append(profile_id.lower())
|
||||
user = find_actor_or_create(profile_id)
|
||||
if user and not instance.user_is_admin(user.id):
|
||||
new_instance_role = InstanceRole(instance_id=instance.id, user_id=user.id,
|
||||
role='admin')
|
||||
|
|
Loading…
Add table
Reference in a new issue