Fix mailing profile log columns mappings

GitLab issue #626. Thanks to Jesaja Everling (@jeverling)
for the report.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-06-20 23:14:33 -04:00
parent c21a9afcfa
commit 6f4802ac6a
4 changed files with 18 additions and 4 deletions

View File

@@ -2,6 +2,9 @@
================== ==================
* Add support for disabling the random primary key * Add support for disabling the random primary key
test mixin. test mixin.
* Fix mailing profile log columns mappings.
GitLab issue #626. Thanks to Jesaja Everling (@jeverling)
for the report.
3.2.2 (2019-06-19) 3.2.2 (2019-06-19)
================== ==================

View File

@@ -9,6 +9,9 @@ Changes
- Add support for disabling the random primary key - Add support for disabling the random primary key
test mixin. test mixin.
- Fix mailing profile log columns mappings.
GitLab issue #626. Thanks to Jesaja Everling (@jeverling)
for the report.
Removals Removals
@@ -98,6 +101,6 @@ Backward incompatible changes
Bugs fixed or issues closed Bugs fixed or issues closed
--------------------------- ---------------------------
- :gitlab-issue:`615` - :gitlab-issue:`626` Mailing profile error log is empty, despite errors
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/ .. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -51,6 +51,7 @@ class MailerApp(MayanAppConfig):
LogEntry = self.get_model(model_name='LogEntry') LogEntry = self.get_model(model_name='LogEntry')
UserMailer = self.get_model(model_name='UserMailer') UserMailer = self.get_model(model_name='UserMailer')
UserMailerLogEntry = self.get_model(model_name='UserMailerLogEntry')
MailerBackend.initialize() MailerBackend.initialize()
@@ -79,6 +80,13 @@ class MailerApp(MayanAppConfig):
SourceColumn( SourceColumn(
source=UserMailer, attribute='backend_label' source=UserMailer, attribute='backend_label'
) )
SourceColumn(
attribute='datetime', label=_('Date and time'),
source=UserMailerLogEntry
)
SourceColumn(
attribute='message', label=_('Message'), source=UserMailerLogEntry
)
ModelPermission.register( ModelPermission.register(
model=Document, permissions=( model=Document, permissions=(

View File

@@ -208,7 +208,7 @@ class UserMailerLogEntryListView(SingleObjectListView):
return { return {
'hide_object': True, 'hide_object': True,
'object': self.get_user_mailer(), 'object': self.get_user_mailer(),
'title': _('%s error log') % self.get_user_mailer(), 'title': _('Error log for: %s') % self.get_user_mailer(),
} }
def get_source_queryset(self): def get_source_queryset(self):