diff --git a/packages/nocodb/src/lib/models/GalleryViewColumn.ts b/packages/nocodb/src/lib/models/GalleryViewColumn.ts index 6e744e0281..8ddf12b6e1 100644 --- a/packages/nocodb/src/lib/models/GalleryViewColumn.ts +++ b/packages/nocodb/src/lib/models/GalleryViewColumn.ts @@ -79,13 +79,11 @@ export default class GalleryViewColumn { ); // if cache is not present skip pushing it into the list to avoid unexpected behaviour - if ( - ( - await NocoCache.getList(CacheScope.GALLERY_VIEW_COLUMN, [ - column.fk_view_id, - ]) - )?.length - ) + const { list } = await NocoCache.getList(CacheScope.GALLERY_VIEW_COLUMN, [ + column.fk_view_id, + ]); + + if (list?.length) await NocoCache.appendToList( CacheScope.GALLERY_VIEW_COLUMN, [column.fk_view_id],