Fixed error with admin notifications on relevant metacategories
authordurandn
Fri, 09 Dec 2016 14:40:56 +0100
changeset 272 c838f9ee207a
parent 271 9de895947b4c
child 273 e91d36cbdfcf
Fixed error with admin notifications on relevant metacategories
src/iconolab/signals/handlers.py
--- a/src/iconolab/signals/handlers.py	Thu Dec 08 14:45:09 2016 +0100
+++ b/src/iconolab/signals/handlers.py	Fri Dec 09 14:40:56 2016 +0100
@@ -113,7 +113,7 @@
                 for contributor in comment_annotation.stats.contributors.exclude(id=related_comment.user.id).all():
                     notify.send(related_comment.user, recipient=contributor, verb='a fait un appel à contribution', action_object=related_comment, target=comment_annotation)
             if related_metacategory.triggers_notifications == MetaCategory.COLLECTION_ADMINS:
-                for collection_admin in UserProfile.objects.filter(administers_collection=comment_annotation.image.item.collection).all():
+                for collection_admin in comment_annotation.image.item.collection.admins.all():
                     notify.send(related_comment.user, recipient=collection_admin.user, verb='a fait un appel à expertise', action_object=related_comment, target=comment_annotation)
         
 def notify_users_on_new_revision(sender, instance, **kwargs):