[bugfix] Don't copy ptr fields in caches (#2386)

This commit is contained in:
tobi
2023-11-27 16:39:44 +01:00
committed by GitHub
parent 0bb9b72334
commit 33ee61575f
12 changed files with 469 additions and 109 deletions

View File

@@ -173,14 +173,14 @@ func (i *instanceDB) getInstance(ctx context.Context, lookup string, dbQuery fun
}
// Further populate the instance fields where applicable.
if err := i.populateInstance(ctx, instance); err != nil {
if err := i.PopulateInstance(ctx, instance); err != nil {
return nil, err
}
return instance, nil
}
func (i *instanceDB) populateInstance(ctx context.Context, instance *gtsmodel.Instance) error {
func (i *instanceDB) PopulateInstance(ctx context.Context, instance *gtsmodel.Instance) error {
var (
err error
errs = gtserror.NewMultiError(2)