Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/btrixcloud/crawls.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ async def add_or_remove_exclusion(self, crawl_id, regex, org, user, add):
)

await self.crawls.find_one_and_update(
{"_id": crawl_id, "oid": org.id}, {"$set": {"config": new_config}}
{"_id": crawl_id, "oid": org.id}, {"$set": {"config": new_config.dict()}}
)

resp = {"success": True}
Expand Down
12 changes: 4 additions & 8 deletions frontend/src/components/exclusion-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,15 @@ export class ExclusionEditor extends LiteElement {
}
);

if (data.new_cid) {
if (data.success) {
this.notify({
message: msg(html`Removed exclusion: <code>${regex}</code>`),
variant: "success",
icon: "check2-circle",
});

this.dispatchEvent(
new CustomEvent("on-success", {
detail: { cid: data.new_cid },
})
new CustomEvent("on-success")
);
} else {
throw data;
Expand Down Expand Up @@ -229,7 +227,7 @@ export class ExclusionEditor extends LiteElement {
}
);

if (data.new_cid) {
if (data.success) {
this.notify({
message: msg("Exclusion added."),
variant: "success",
Expand All @@ -242,9 +240,7 @@ export class ExclusionEditor extends LiteElement {

onSuccess();
this.dispatchEvent(
new CustomEvent("on-success", {
detail: { cid: data.new_cid },
})
new CustomEvent("on-success")
);
} else {
throw data;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/org/workflows-new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const defaultValue = {
},
tags: [],
crawlTimeout: null,
jobType: "custom",
jobType: undefined,
scale: 1,
} as WorkflowParams;

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type SeedConfig = Pick<
export type JobType = "url-list" | "seed-crawl" | "custom";

export type WorkflowParams = {
jobType: JobType;
jobType?: JobType;
name: string;
schedule: string;
scale: number;
Expand Down