You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by as...@apache.org on 2014/02/05 10:55:34 UTC
svn commit: r1564692 -
/bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py
Author: astaric
Date: Wed Feb 5 09:55:33 2014
New Revision: 1564692
URL: http://svn.apache.org/r1564692
Log:
Do not send notification if relation could not be created.
Modified:
bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py
Modified: bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py?rev=1564692&r1=1564691&r2=1564692&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py (original)
+++ bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py Wed Feb 5 09:55:33 2014
@@ -104,18 +104,18 @@ class RelationManagementModule(Component
data['error'] = _('Unknown relation type.')
except ValidationError as ex:
data['error'] = ex.message
-
- # Notify
- try:
- self.notify_relation_changed(dbrel)
- except Exception, e:
- self.log.error("Failure sending notification on"
- "creation of relation: %s",
- exception_to_unicode(e))
- add_warning(req, _("The relation has been added, but an "
- "error occurred while sending"
- "notifications: " "%(message)s",
- message=to_unicode(e)))
+ else:
+ # Notify
+ try:
+ self.notify_relation_changed(dbrel)
+ except Exception, e:
+ self.log.error("Failure sending notification on"
+ "creation of relation: %s",
+ exception_to_unicode(e))
+ add_warning(req, _("The relation has been added, but an "
+ "error occurred while sending"
+ "notifications: " "%(message)s",
+ message=to_unicode(e)))
if 'error' in data:
data['relation'] = relation