notifications: add a namespace() query filter (#13122)

This commit is contained in:
Benjamin Dauvergne 2018-03-20 10:39:53 +01:00
parent f2719b3a68
commit 8d9ac05b6d
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ from combo.data.library import register_cell_class
class NotificationQuerySet(QuerySet):
def namespace(self, namespace):
return self.filter(external_id__startswith='%s:' % namespace)
def find(self, user, id):
qs = self.filter(user=user)
try: