Swagger for import-exoprt
This commit is contained in:
@@ -81,7 +81,16 @@ func (o One) MarshalBSON() ([]byte, error) {
|
||||
default:
|
||||
return nil, fmt.Errorf("bad connections type %T", m[Connections])
|
||||
}
|
||||
delete(connections, "")
|
||||
for k := range connections {
|
||||
if k == "" {
|
||||
continue
|
||||
}
|
||||
if o.Connections[k].Name == "" {
|
||||
p := o.Connections[k]
|
||||
p.Name = k
|
||||
o.Connections[k] = p
|
||||
}
|
||||
b, err := bson.Marshal(o.Connections[k])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user