@budibase/server 2.7.9 → 2.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4951,6 +4951,9 @@ var init_lucene = __esm({
4951
4951
  return contains(key, value, "OR");
4952
4952
  };
4953
4953
  const oneOf = (key, value) => {
4954
+ if (!value) {
4955
+ return `*:*`;
4956
+ }
4954
4957
  if (!Array.isArray(value)) {
4955
4958
  if (typeof value === "string") {
4956
4959
  value = value.split(",");
@@ -33564,9 +33567,15 @@ async function exportRows2(ctx) {
33564
33567
  ctx.request.body = {
33565
33568
  query: {
33566
33569
  oneOf: {
33567
- _id: ctx.request.body.rows.map(
33568
- (row2) => JSON.parse(decodeURI(row2))[0]
33569
- )
33570
+ _id: ctx.request.body.rows.map((row2) => {
33571
+ const ids = JSON.parse(
33572
+ decodeURI(row2).replace(/'/g, `"`).replace(/%2C/g, ",")
33573
+ );
33574
+ if (ids.length > 1) {
33575
+ ctx.throw(400, "Export data does not support composite keys.");
33576
+ }
33577
+ return ids[0];
33578
+ })
33570
33579
  }
33571
33580
  }
33572
33581
  };