Skip to content

Commit

Permalink
Temporarily disable soft-deletion of tickets (proofcarryingdata#1238)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Chub <[email protected]>
  • Loading branch information
robknight and ichub authored Nov 13, 2023
1 parent 8e615d0 commit 495ca03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
fetchDevconnectTicketsAwaitingSync
} from "../../database/queries/devconnect_pretix_tickets/fetchDevconnectPretixTicket";
import { insertDevconnectPretixTicket } from "../../database/queries/devconnect_pretix_tickets/insertDevconnectPretixTicket";
import { softDeleteDevconnectPretixTicket } from "../../database/queries/devconnect_pretix_tickets/softDeleteDevconnectPretixTicket";
import { updateDevconnectPretixTicket } from "../../database/queries/devconnect_pretix_tickets/updateDevconnectPretixTicket";
import {
fetchPretixEventInfo,
Expand Down Expand Up @@ -885,7 +884,7 @@ export class OrganizerSync {
eventInfo.event_name
}] Deleting ticket ${JSON.stringify(removedTicket)}`
);
await softDeleteDevconnectPretixTicket(this.db, removedTicket);
//await softDeleteDevconnectPretixTicket(this.db, removedTicket);
}

if (this.enableRedaction) {
Expand Down
16 changes: 12 additions & 4 deletions apps/passport-server/test/devconnect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,14 @@ describe("devconnect functionality", function () {

await devconnectPretixSyncService.trySync();

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const tickets = await fetchAllNonDeletedDevconnectPretixTickets(
application.context.dbPool
);

// Because two tickets are removed - see comment above
// @todo restore the rest of this test
/**
expect(tickets).to.have.length(11);
const ticketsWithEmailEventAndItems = tickets.map((o) => ({
Expand Down Expand Up @@ -1002,7 +1005,7 @@ describe("devconnect functionality", function () {
email: mocker.get().organizer1.EMAIL_4,
itemInfoID: item2EventAInfoID
}
]);
]); */
});

/**
Expand Down Expand Up @@ -2629,11 +2632,13 @@ describe("devconnect functionality", function () {

await os.run();

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const tickets = await fetchDevconnectPretixTicketsByEvent(
db,
eventConfigID
);
expect(tickets.length).to.eq(0);
// @todo restore this check
//expect(tickets.length).to.eq(0);
const ordersForEvent = org.ordersByEventID.get(
eventID
) as DevconnectPretixOrder[];
Expand Down Expand Up @@ -2677,7 +2682,8 @@ describe("devconnect functionality", function () {
db,
testEmail
);
expect(unredactedTickets.length).to.eq(0);
// @todo restore this check
// expect(unredactedTickets.length).to.eq(0);
expect(redactedTickets.length).to.eq(3);

unredactUser = await testLogin(application, testEmail, {
Expand Down Expand Up @@ -2814,7 +2820,9 @@ describe("devconnect functionality", function () {
db,
testEmail
);
expect(unredactedTickets.length).to.eq(0);

// @todo restore this check
// expect(unredactedTickets.length).to.eq(0);
expect(redactedTickets.length).to.eq(3);

const result = await agreeTerms(
Expand Down

0 comments on commit 495ca03

Please sign in to comment.