Browse Source

Small code improvement for lookup of existing customer.

Martin Edenhofer 7 years ago
parent
commit
9cc1c471a3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/controllers/tickets_controller.rb

+ 1 - 1
app/controllers/tickets_controller.rb

@@ -124,7 +124,7 @@ class TicketsController < ApplicationController
       if !local_customer && clean_customer[:id].present?
         local_customer = User.find_by(id: clean_customer[:id])
       end
-      if clean_customer[:email].present?
+      if !local_customer && clean_customer[:email].present?
         local_customer = User.find_by(email: clean_customer[:email].downcase)
       end
       if !local_customer && clean_customer[:login].present?