Просмотр исходного кода

Fix customer not saving on location form

Alan Lam 3 лет назад
Родитель
Сommit
cdfc0411c1
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      controllers/location_form.php

+ 3 - 0
controllers/location_form.php

@@ -53,6 +53,9 @@ if($submit) {
 	try {
 		$user->requireValidCsrfToken();
 
+		$customer_id = $request->int("customer_id");
+		$customer = Customer::require($customer_id);
+
 		$location->customer_id = $customer->id;
 		$location->name = $request->string("name");
 		$location->phone = $request->string("phone");