Commit 4a3474b9bfeac068f1d210cef23196696ecf5afb
1 parent
8187e519
Exists in
master
and in
5 other branches
Fix duplicate identifier for Institution
Signed-off-by: Parley Martins <parley@outlook.com> Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
controllers/mpog_software_plugin_controller.rb
... | ... | @@ -78,10 +78,10 @@ class MpogSoftwarePluginController < ApplicationController |
78 | 78 | institution.community.add_admin(adm) |
79 | 79 | end |
80 | 80 | end |
81 | - response_message = if institution.errors.full_messages.empty? and institution.valid? and institution.save | |
81 | + response_message = if institution.errors.full_messages.empty? and institution.community.errors.full_messages.empty? and institution.valid? and institution.save | |
82 | 82 | {:success => true, :message => _("Institution successful created!"), :institution_data=>{:name=>institution.name, :id=>institution.id}} |
83 | 83 | else |
84 | - {:success => false, :message => _("Institution could not be created!"), :errors => institution.errors.full_messages} | |
84 | + {:success => false, :message => _("Institution could not be created!"), :errors => institution.errors.full_messages << institution.community.errors.full_messages} | |
85 | 85 | end |
86 | 86 | |
87 | 87 | if request.xhr? | ... | ... |