mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
avoid attributeerror
This commit is contained in:
parent
28ef241bd3
commit
910ba06620
2 changed files with 1 additions and 2 deletions
|
@ -1559,7 +1559,7 @@ def create_post(activity_log: ActivityPubLog, community: Community, request_json
|
|||
if 'tag' in request_json['object'] and isinstance(request_json['object']['tag'], list):
|
||||
for json_tag in request_json['object']['tag']:
|
||||
if json_tag and json_tag['type'] == 'Hashtag':
|
||||
if json_tag['name'][1:].lower() != post.community.name.lower(): # Lemmy adds the community slug as a hashtag on every post in the community, which we want to ignore
|
||||
if json_tag['name'][1:].lower() != community.name.lower(): # Lemmy adds the community slug as a hashtag on every post in the community, which we want to ignore
|
||||
hashtag = find_hashtag_or_create(json_tag['name'])
|
||||
if hashtag:
|
||||
post.tags.append(hashtag)
|
||||
|
|
|
@ -220,7 +220,6 @@ def register(app):
|
|||
|
||||
# retrieve list of Admins from /api/v3/site, update InstanceRole
|
||||
if not instance.dormant and (instance.software == 'lemmy' or instance.software == 'piefed'):
|
||||
|
||||
try:
|
||||
response = get_request(f'https://{instance.domain}/api/v3/site')
|
||||
except:
|
||||
|
|
Loading…
Add table
Reference in a new issue