Undefined context checks
This commit is contained in:
parent
67619364b9
commit
1843233168
|
@ -49,9 +49,14 @@ export async function create(tableId: string, rowAction: { name: string }) {
|
|||
|
||||
ensureUniqueAndThrow(doc, action.name)
|
||||
|
||||
const appId = context.getAppId()
|
||||
if (!appId) {
|
||||
throw new Error("Could not get the current appId")
|
||||
}
|
||||
|
||||
const automation = await automations.create({
|
||||
name: `${tableName}: ${action.name}`,
|
||||
appId: context.getAppId()!,
|
||||
appId,
|
||||
definition: {
|
||||
trigger: {
|
||||
type: AutomationStepType.TRIGGER,
|
||||
|
|
Loading…
Reference in New Issue