Переглянути джерело

Fix customer not saving on location form

Alan Lam 3 роки тому
батько
коміт
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");