[#38] added lint and used the lint suggestions

This commit is contained in:
Valley
2022-07-09 22:17:41 +08:00
committed by GitHub
parent dfd9528847
commit d64fbf9011
36 changed files with 110 additions and 65 deletions

View File

@@ -44,7 +44,6 @@ func NewRecordUpsert(app core.App, record *models.Record) *RecordUpsert {
form.Data = map[string]any{}
for _, field := range record.Collection().Schema.Fields() {
form.Data[field.Name] = record.GetDataValue(field.Name)
}
return form
@@ -147,7 +146,7 @@ func (form *RecordUpsert) LoadData(r *http.Request) error {
for _, field := range form.record.Collection().Schema.Fields() {
key := field.Name
value, _ := extendedData[key]
value := extendedData[key]
value = field.PrepareValue(value)
if field.Type == schema.FieldTypeFile {