From a547c302491e38ab0ad90fa441c6428db47f8003 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Mon, 17 Feb 2025 11:43:11 +0100 Subject: [PATCH] Wrong model Signed-off-by: Martin Weise <martin.weise@tuwien.ac.at> --- lib/python/dbrepo/RestClient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/python/dbrepo/RestClient.py b/lib/python/dbrepo/RestClient.py index a0b4bf60c4..54d377079d 100644 --- a/lib/python/dbrepo/RestClient.py +++ b/lib/python/dbrepo/RestClient.py @@ -822,7 +822,7 @@ class RestClient: raise ResponseCodeError(f'Failed to get table history: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_views(self, database_id: int) -> List[View]: + def get_views(self, database_id: int) -> List[ViewBrief]: """ Gets views of a database with given database id. @@ -837,7 +837,7 @@ class RestClient: response = self._wrapper(method="get", url=url) if response.status_code == 200: body = response.json() - return TypeAdapter(List[View]).validate_python(body) + return TypeAdapter(List[ViewBrief]).validate_python(body) if response.status_code == 404: raise NotExistsError(f'Failed to find views: not found') raise ResponseCodeError(f'Failed to find views: response code: {response.status_code} is not ' -- GitLab