From cba9f19ba50c60576a5961e89c24caefca52d740 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 3 Sep 2023 23:39:05 +0530 Subject: deleting addresses upon customer deletion --- customer/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'customer/service.go') diff --git a/customer/service.go b/customer/service.go index f1108c6..a79e466 100644 --- a/customer/service.go +++ b/customer/service.go @@ -22,7 +22,7 @@ import ( ) func getCustomer(customer *Customer, id uint) error { - res := db.Preload("Contact").Preload("BillingAddress").Preload("ShippingAddresses").Find(&customer, id) + res := db.Preload("BillingAddress").Preload("ShippingAddresses").Find(&customer, id) // TODO: handle potential errors if res.Error != nil { -- cgit v1.2.3