mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 09:47:08 +00:00
Ensure that project is defined.
Which would not be in the case of the `project` event unless we look at the `new` and `old` properties.
This commit is contained in:
@@ -66,7 +66,7 @@ const rels = [
|
||||
function invalidateCache (data, cache) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const channel = data.channel;
|
||||
const project = data.payload.pid;
|
||||
const project = data.payload.pid ?? data.payload?.new?.pid ?? data.payload?.old?.pid;
|
||||
const operation = data.payload.operation;
|
||||
const table = data.payload.table;
|
||||
const fields = { channel, project, operation, table };
|
||||
|
||||
Reference in New Issue
Block a user