1
0
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:
Nikitin Aleksandr 2023-11-14 09:47:31 +03:00
parent 37adeda7c1
commit 319d84fd40

View File

@ -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