From 4bde389d6b47122b017b48a0ca117faa90ec5dc8 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 4 Nov 2020 14:13:34 -0800 Subject: [PATCH] Fixes matching activities to models --- bookwyrm/models/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/models/__init__.py b/bookwyrm/models/__init__.py index 18ddb8041..83e34c8e2 100644 --- a/bookwyrm/models/__init__.py +++ b/bookwyrm/models/__init__.py @@ -16,5 +16,5 @@ from .import_job import ImportJob, ImportItem from .site import SiteSettings, SiteInvite, PasswordReset cls_members = inspect.getmembers(sys.modules[__name__], inspect.isclass) -activity_models = {c[0]: c[1] for c in cls_members \ - if hasattr(c[1], 'activity_serializer')} +activity_models = {c[1].activity_serializer.__name__: c[0] \ + for c in cls_members if hasattr(c[1], 'activity_serializer')}