Add support for clearing the generic object error log.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-08-28 17:56:39 -04:00
parent 275229cd52
commit 8d76120ac7
5 changed files with 98 additions and 68 deletions

View File

@@ -109,6 +109,9 @@ class ErrorLogNamespace(object):
def __str__(self):
return force_text(self.label)
def create(self, obj, result):
obj.error_logs.create(namespace=self.name, result=result)
def all(self):
ErrorLogEntry = apps.get_model(
app_label='common', model_name='ErrorLogEntry'