diff --git a/pagure/ui/groups.py b/pagure/ui/groups.py index 09c27c0..2dc4bcd 100644 --- a/pagure/ui/groups.py +++ b/pagure/ui/groups.py @@ -221,6 +221,9 @@ def add_group(): flask.flash('Group `%s` created.' % group_name) flask.flash(msg) return flask.redirect(flask.url_for('.group_lists')) + except pagure.exceptions.PagureException, err: + pagure.SESSION.rollback() + flask.flash(err.message, 'error') except SQLAlchemyError as err: # pragma: no cover pagure.SESSION.rollback() flask.flash('Could not create group.')