From becc5127ec4e322aa13814542bf887764e2ef3af Mon Sep 17 00:00:00 2001 From: Eric Duong Date: Mon, 4 Dec 2023 15:24:06 -0500 Subject: [PATCH] chore(data-warehouse): add back url_pattern (#19063) add back url_pattern --- posthog/warehouse/api/table.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/posthog/warehouse/api/table.py b/posthog/warehouse/api/table.py index 2c56071a515f5..dde77e344e2f9 100644 --- a/posthog/warehouse/api/table.py +++ b/posthog/warehouse/api/table.py @@ -1,4 +1,4 @@ -from typing import Any, List, Optional +from typing import Any, List from rest_framework import filters, request, response, serializers, status, viewsets from rest_framework.exceptions import NotAuthenticated @@ -35,7 +35,6 @@ class TableSerializer(serializers.ModelSerializer): created_by = UserBasicSerializer(read_only=True) credential = CredentialSerializer() columns = serializers.SerializerMethodField(read_only=True) - url_pattern = serializers.SerializerMethodField(read_only=True) external_data_source = ExternalDataSourceSerializers(read_only=True) class Meta: @@ -54,9 +53,6 @@ class Meta: ] read_only_fields = ["id", "created_by", "created_at", "columns", "external_data_source"] - def get_url_pattern(self, table: DataWarehouseTable) -> Optional[str]: - return None if table.external_data_source_id else table.url_pattern - def get_columns(self, table: DataWarehouseTable) -> List[SerializedField]: return serialize_fields(table.hogql_definition().fields)