Default required fields to empty strings
So the insertion doesn't fail
This commit is contained in:
parent
a2271a2ce8
commit
c0935c848b
1 changed files with 13 additions and 14 deletions
|
|
@ -203,20 +203,19 @@ func parseCSVPoollist(ctx context.Context, txn bob.Tx, f *models.FileuploadFile,
|
|||
}
|
||||
tags := make(map[string]string, 0)
|
||||
setter := models.FileuploadPoolSetter{
|
||||
// required fields
|
||||
//AddressNumber: omit.From(),
|
||||
//AddressLocality: omit.From(),
|
||||
//AddressPostalCode: omit.From(),
|
||||
//AddressRegion: omit.From(),
|
||||
//AddressStreet: omit.From(),
|
||||
Committed: omit.From(false),
|
||||
Condition: omit.From(enums.PoolconditiontypeUnknown),
|
||||
Created: omit.From(time.Now()),
|
||||
CreatorID: omit.From(f.CreatorID),
|
||||
CSVFile: omit.From(f.ID),
|
||||
Deleted: omitnull.FromPtr[time.Time](nil),
|
||||
Geom: omitnull.FromPtr[string](nil),
|
||||
H3cell: omitnull.FromPtr[string](nil),
|
||||
AddressNumber: omit.From(""),
|
||||
AddressLocality: omit.From(""),
|
||||
AddressPostalCode: omit.From(""),
|
||||
AddressRegion: omit.From(""),
|
||||
AddressStreet: omit.From(""),
|
||||
Committed: omit.From(false),
|
||||
Condition: omit.From(enums.PoolconditiontypeUnknown),
|
||||
Created: omit.From(time.Now()),
|
||||
CreatorID: omit.From(f.CreatorID),
|
||||
CSVFile: omit.From(f.ID),
|
||||
Deleted: omitnull.FromPtr[time.Time](nil),
|
||||
Geom: omitnull.FromPtr[string](nil),
|
||||
H3cell: omitnull.FromPtr[string](nil),
|
||||
// ID - generated
|
||||
IsInDistrict: omit.From(false),
|
||||
IsNew: omit.From(true),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue