diff --git a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx index 93cffddfa01..b322fb07f34 100644 --- a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx +++ b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx @@ -460,12 +460,14 @@ export function HogFunctionConfiguration({ templateId, id }: HogFunctionConfigur {({ value, onChange }) => ( <> - - This is the underlying Hog code that will run whenever the - filters match.{' '} - See the docs for - more info - + {type !== 'web' ? ( + + This is the underlying Hog code that will run whenever the + filters match.{' '} + See the docs{' '} + for more info + + ) : null} HogFunction: request = self.context["request"] validated_data["created_by"] = request.user - return super().create(validated_data=validated_data) + hog_function = super().create(validated_data=validated_data) + if validated_data.get("type") == "web": + # Re-run the transpilation now that we have an ID + hog_function.transpiled = get_transpiled_function( + str(hog_function.id), hog_function.hog, hog_function.filters, hog_function.inputs, hog_function.team + ) + return hog_function def update(self, instance: HogFunction, validated_data: dict, *args, **kwargs) -> HogFunction: res: HogFunction = super().update(instance, validated_data)