Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: dal error when offset is negative

Daniel Hougaard4333773c0d91
diff --git a/backend/src/ee/services/group/group-dal.ts b/backend/src/ee/services/group/group-dal.ts
index 708fbdbd36..04ed2dec97 100644
--- a/backend/src/ee/services/group/group-dal.ts
+++ b/backend/src/ee/services/group/group-dal.ts
@@ -20,7 +20,7 @@ export const groupDALFactory = (db: TDbClient) => {
.select(selectAllTableCols(TableName.Groups));
if (limit) void query.limit(limit);
- if (offset) void query.limit(offset);
+ if (offset && offset > 0) void query.offset(offset);
if (sort) {
void query.orderBy(sort.map(([column, order, nulls]) => ({ column: column as string, order, nulls })));
}