Move comment user label extraction to the model

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-20 23:22:58 -04:00
parent 2ee2b2f5e0
commit 90393e043e
2 changed files with 8 additions and 4 deletions

View File

@@ -76,10 +76,7 @@ class DocumentCommentsApp(MayanAppConfig):
)
SourceColumn(attribute='submit_date', source=Comment)
SourceColumn(
func=lambda context: context['object'].user.get_full_name() if context['object'].user.get_full_name() else context['object'].user,
source=Comment
)
SourceColumn(attribute='get_user_label', source=Comment)
SourceColumn(attribute='comment', source=Comment)
document_page_search.add_model_field(