Add support for global and object event notification. GitLab issue #262.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-08-01 01:18:07 -04:00
parent 5083a2d261
commit c0407652c0
30 changed files with 1193 additions and 111 deletions
+6 -2
View File
@@ -219,9 +219,13 @@ class Document(models.Model):
if new_document:
if user:
self.add_as_recent_document_for_user(user)
event_document_create.commit(actor=user, target=self)
event_document_create.commit(
actor=user, target=self, action_object=self.document_type
)
else:
event_document_create.commit(target=self)
event_document_create.commit(
target=self, action_object=self.document_type
)
else:
event_document_properties_edit.commit(actor=user, target=self)