mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2025-01-01 13:21:20 +02:00
сделал if ColumnName == "CreatedAt"
This commit is contained in:
parent
37adeda7c1
commit
319d84fd40
@ -188,6 +188,9 @@ func (crud Crud_DB) create_update_ctx(ctx context.Context, m *lawsuit_status_typ
|
||||
// запишем NULL в пустые колонки
|
||||
for f := 0; f < len(MassOmit); f++ {
|
||||
ColumnName := MassOmit[f]
|
||||
if ColumnName == "CreatedAt" {
|
||||
continue
|
||||
}
|
||||
tx = db.Model(&m).Update(ColumnName, gorm.Expr("NULL"))
|
||||
|
||||
err = tx.Error
|
||||
|
Loading…
Reference in New Issue
Block a user