last modified in update for all tables

This commit is contained in:
2018-11-16 10:42:25 +01:00
parent dec75bea91
commit cb7a46617d
6 changed files with 9 additions and 2 deletions

View File

@@ -123,6 +123,7 @@ func GetAllCompanyUser(o orm.Ormer, query map[string]string, fields []string, so
// UpdateCompanyUserById updates CompanyUser by Id and returns error if the record to be updated doesn't exist
func UpdateCompanyUserById(o orm.Ormer, m *CompanyUser) (err error) {
m.Modified = time.Now()
v := CompanyUser{Id: m.Id}
// ascertain id exists in the database
if err = o.Read(&v); err == nil {