diff --git a/data/model/notification.py b/data/model/notification.py index 9ce0a5de4..53e2eed78 100644 --- a/data/model/notification.py +++ b/data/model/notification.py @@ -79,7 +79,7 @@ def list_notifications(user, kind_name=None, id_filter=None, include_dismissed=F def delete_all_notifications_by_path_prefix(prefix): (Notification .delete() - .where(Notification.lookup_path % prefix) + .where(Notification.lookup_path % prefix + '%') .execute()) diff --git a/data/model/service_keys.py b/data/model/service_keys.py index c323a71eb..49d70894a 100644 --- a/data/model/service_keys.py +++ b/data/model/service_keys.py @@ -47,7 +47,7 @@ def _notify_superusers(key): superusers = User.select().where(User.username << config.app_config['SUPER_USERS']) for superuser in superusers: create_notification('service_key_submitted', superuser, metadata=notification_metadata, - lookup_path='/service_key_approval/{0}'.format(key.kid)) + lookup_path='/service_key_approval/{0}/{1}'.format(key.kid, superuser.id)) def create_service_key(name, kid, service, jwk, metadata, expiration_date):