minor code optimizations

This commit is contained in:
Gani Georgiev
2022-12-13 09:07:50 +02:00
parent 1248421703
commit b1a63bb98d
2 changed files with 7 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ func (dao *Dao) expandRecords(records []*models.Record, expandPath string, fetch
}
// reindex with the rel id
indexedRels := map[string]*models.Record{}
indexedRels := make(map[string]*models.Record, len(rels))
for _, rel := range rels {
indexedRels[rel.GetId()] = rel
}