[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
commit 33ee61575f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)