From 05268541100f11b3a0e089adcc1bbb591f4579de Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Fri, 10 Oct 2025 19:30:02 +0530 Subject: Bug fix: phone validation error when editing a client --- customer/validators.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/customer/validators.go b/customer/validators.go index ea2a9d5..a495772 100644 --- a/customer/validators.go +++ b/customer/validators.go @@ -61,7 +61,7 @@ func checkDuplicateExisting(field, value string, userId, customerId uint) error if value != "" { var count int64 err := db.Model(&Customer{}). - Where("user_id = ? and id != ? and" + field + " = ?", userId, customerId, value). + Where("user_id = ? and id != ? and " + field + " = ?", userId, customerId, value). Count(&count). Error diff --git a/main.go b/main.go index 24e3ab9..9ea1416 100644 --- a/main.go +++ b/main.go @@ -38,7 +38,7 @@ import ( "log" ) -const OPENBILLS_VERSION = "v0.13.0" +const OPENBILLS_VERSION = "v0.13.1" func init() { if !viper.GetBool("debug_mode") { -- cgit v1.2.3