Skip to content

Commit cafb8fc

Browse files
authored
Ensure that the CoreHTTPTriggerService.uid is serializable. (baserow#4159)
1 parent 96d4d1b commit cafb8fc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

backend/src/baserow/contrib/integrations/core/service_types.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,31 @@ def get_api_urls(self) -> List[path]:
14071407
),
14081408
]
14091409

1410+
def serialize_property(
1411+
self,
1412+
service: CoreHTTPTriggerService,
1413+
prop_name: str,
1414+
files_zip=None,
1415+
storage=None,
1416+
cache=None,
1417+
):
1418+
"""
1419+
Responsible for serializing the trigger's properties.
1420+
1421+
:param service: The CoreHTTPTriggerService service.
1422+
:param prop_name: The property name we're serializing.
1423+
:param files_zip: The zip file containing the files.
1424+
:param storage: The storage to use for the files.
1425+
:param cache: The cache to use for the files.
1426+
"""
1427+
1428+
if prop_name == "uid":
1429+
return str(service.uid)
1430+
1431+
return super().serialize_property(
1432+
service, prop_name, files_zip=files_zip, storage=storage, cache=cache
1433+
)
1434+
14101435
def process_webhook_request(
14111436
self, webhook_uid: uuid.uuid4, request_data: Dict[str, Any], simulate: bool
14121437
) -> None:

0 commit comments

Comments
 (0)