Skip to content

Commit

Permalink
[#241] Sometimes it is good to read the code before commiting a change
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Feb 18, 2013
1 parent 4ad8f12 commit 6775825
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/logic/action/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,8 @@ def follow_group(context, data_dict):
# Don't let a user follow a group she is already following.
if model.UserFollowingGroup.is_following(userobj.id,
validated_data_dict['id']):
name = data_dict['display_name']
groupobj = model.User.get(validated_data_dict['id'])
name = groupobj.display_name
message = _(
'You are already following group {0}').format(name)
raise ValidationError({'message': message}, error_summary=message)
Expand Down

0 comments on commit 6775825

Please sign in to comment.