# HG changeset patch # User durandn # Date 1481290856 -3600 # Node ID c838f9ee207aebb9e3daf25a67121f27dc481815 # Parent 9de895947b4c7687fad8c8c4a092b2b98e8445b4 Fixed error with admin notifications on relevant metacategories diff -r 9de895947b4c -r c838f9ee207a 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):