diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index c819af7b..b2c715ad 100644 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -215,14 +215,11 @@ end end if response["status"] == true - customer = Customer.find(@crm_customer.customer_id) status = customer.update_attributes(membership_id: response["customer_datas"]["id"],membership_type:member_group_id ) format.html { redirect_to crm_customers_path, notice: 'Customer was successfully updated'} - else - customer = Customer.find(@crm_customer.customer_id) # Check membership id and bind to user if response["membership_id"] != nil diff --git a/app/views/crm/customers/_new_form.html.erb b/app/views/crm/customers/_new_form.html.erb index 3c09d20f..b99c25a3 100644 --- a/app/views/crm/customers/_new_form.html.erb +++ b/app/views/crm/customers/_new_form.html.erb @@ -128,10 +128,9 @@