correctly grab book data from tags

This commit is contained in:
Mouse Reeve 2020-10-31 13:39:52 -07:00
parent 418971e9f8
commit c45247e236

View file

@ -230,7 +230,7 @@ def handle_create(activity):
if hasattr(activity, 'inReplyToBook'): if hasattr(activity, 'inReplyToBook'):
book_urls.append(activity.inReplyToBook) book_urls.append(activity.inReplyToBook)
if hasattr(activity, 'tag'): if hasattr(activity, 'tag'):
book_urls += [t.href for t in activity.tag if t.type == 'Book'] book_urls += [t['href'] for t in activity.tag if t['type'] == 'Book']
for remote_id in book_urls: for remote_id in book_urls:
books_manager.get_or_create_book(remote_id) books_manager.get_or_create_book(remote_id)