domain_blocks parsing fix
This commit is contained in:
parent
71755183c0
commit
565048cd09
2 changed files with 2 additions and 2 deletions
|
@ -206,7 +206,7 @@ def get_related_acct_list(site, token, api):
|
|||
response = get(url, headers={'User-Agent': 'NeoDB/1.0', 'Authorization': f'Bearer {token}'})
|
||||
url = None
|
||||
if response.status_code == 200:
|
||||
results.extend(map(lambda u: u['acct'] if u['acct'].find('@') != -1 else u['acct'] + site, response.json()))
|
||||
results.extend(map(lambda u: (u['acct'] if u['acct'].find('@') != -1 else u['acct'] + site) if 'acct' in u else u, response.json()))
|
||||
if 'Link' in response.headers:
|
||||
for ls in response.headers['Link'].split(','):
|
||||
li = ls.strip().split(';')
|
||||
|
|
|
@ -9,7 +9,7 @@ class Command(BaseCommand):
|
|||
|
||||
def handle(self, *args, **options):
|
||||
count = 0
|
||||
for user in User.objects.filter(mastodon_last_refresh__lt=timezone.now() - timedelta(hours=24)):
|
||||
for user in User.objects.filter(mastodon_last_refresh__lt=timezone.now() - timedelta(hours=5)):
|
||||
if user.mastodon_token:
|
||||
print(f"Refreshing {user}")
|
||||
if user.refresh_mastodon_data():
|
||||
|
|
Loading…
Add table
Reference in a new issue