Skip to content

Commit

Permalink
make FF exclude lists always enabled (#1848)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcb37 authored Aug 21, 2024
1 parent e7b06ef commit ed8289a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,16 @@ export class UpsertPrivateSegmentListModalComponent {
sendRequest(action: UPSERT_PRIVATE_SEGMENT_LIST_ACTION): void {
const formData = this.privateSegmentListForm.value;
const listType = formData.listType;
const isExcludeList = [
UPSERT_PRIVATE_SEGMENT_LIST_ACTION.ADD_FLAG_EXCLUDE_LIST,
UPSERT_PRIVATE_SEGMENT_LIST_ACTION.EDIT_FLAG_EXCLUDE_LIST,
].includes(action);
let list: PrivateSegmentListRequestBase = this.createPrivateSegmentListBaseRequest(formData);
list = this.createRequestByListType(formData, listType);

const listRequest: PrivateSegmentListRequest = {
flagId: this.config.params.flagId,
enabled: this.config.params.sourceList?.enabled ?? false, // Maintain existing status for edits, default to false for new lists
enabled: this.config.params.sourceList?.enabled || isExcludeList, // Maintain existing status for edits, default to false for new include lists, true for all exclude lists
listType,
list,
};
Expand Down

0 comments on commit ed8289a

Please sign in to comment.