Clean up models
removes unused function and sorts replies correctly
This commit is contained in:
parent
d65657882e
commit
957f0889aa
2 changed files with 6 additions and 8 deletions
|
@ -25,8 +25,3 @@ from .site import SiteSettings, SiteInvite, PasswordReset
|
|||
cls_members = inspect.getmembers(sys.modules[__name__], inspect.isclass)
|
||||
activity_models = {c[1].activity_serializer.__name__: c[1] \
|
||||
for c in cls_members if hasattr(c[1], 'activity_serializer')}
|
||||
|
||||
def to_activity(activity_json):
|
||||
''' link up models and activities '''
|
||||
activity_type = activity_json.get('type')
|
||||
return activity_models[activity_type].to_activity(activity_json)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue