Skip to content
Snippets Groups Projects
Commit 30f6d532 authored by Anton Sattarov's avatar Anton Sattarov
Browse files

fix panic

parent ba62b07c
No related branches found
No related tags found
No related merge requests found
......@@ -47,8 +47,10 @@ func (m cachingMiddleware) Get(ctx context.Context, spaceId, envId, collectionId
for _, al := range env.Aliases {
_ = m.cache.Set(makeKey(itm.SpaceID, al, itm.CollectionID, itm.ID), itm)
}
return itm.Clone(), err
}
return itm.Clone(), err
return nil, err
}
func (m cachingMiddleware) Update(ctx context.Context, item *service.Item, options ...*service.UpdateOptions) (err error) {
......@@ -152,9 +154,10 @@ func (m cachingMiddleware) GetPublished(ctx context.Context, spaceId, envId, col
for _, al := range env.Aliases {
_ = m.cachePublished.Set(makeKey(itm.SpaceID, al, itm.CollectionID, itm.ID), value)
}
return itm.Clone(), err
}
return itm.Clone(), err
return nil, err
}
func (m cachingMiddleware) Archive(ctx context.Context, item *service.Item, options ...*service.ArchiveOptions) (err error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment