mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-03 09:46:19 +00:00
Preserve type field if needs be
This commit is contained in:
parent
f4898c6187
commit
a8e6947251
@ -17,6 +17,10 @@ type defaultMapper struct {
|
||||
}
|
||||
|
||||
func (d *defaultMapper) FromInternal(data map[string]interface{}) {
|
||||
if t, ok := data["type"]; ok {
|
||||
data["_type"] = t
|
||||
}
|
||||
|
||||
if _, ok := data["id"]; ok || data == nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user