@naturalcycles/abba 1.12.0 → 1.12.1

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/abba.js CHANGED
@@ -149,7 +149,7 @@ class Abba {
149
149
  bucketKey: experiment.buckets.find(b => b.id === existing.bucketId)?.key || null,
150
150
  });
151
151
  }
152
- else if (!existingOnly) {
152
+ else if (!existingOnly && experiment.status === types_1.AssignmentStatus.Active) {
153
153
  const assignment = this.generateUserAssignmentData(experiment, userId, segmentationData);
154
154
  if (assignment) {
155
155
  const created = this.userAssignmentDao.create(assignment);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/abba",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build": "build",
package/src/abba.ts CHANGED
@@ -214,7 +214,7 @@ export class Abba {
214
214
  ...existing,
215
215
  bucketKey: experiment.buckets.find(b => b.id === existing.bucketId)?.key || null,
216
216
  })
217
- } else if (!existingOnly) {
217
+ } else if (!existingOnly && experiment.status === AssignmentStatus.Active) {
218
218
  const assignment = this.generateUserAssignmentData(experiment, userId, segmentationData)
219
219
  if (assignment) {
220
220
  const created = this.userAssignmentDao.create(assignment)