Skip to content

Commit

Permalink
testing if ruff gives error in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnaglodha committed Sep 3, 2024
1 parent 1402c35 commit 7ca8f1b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/geoserverx/_sync/gsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,3 +433,19 @@ def get_all_layer_groups(
else:
results = self.response_recognise(responses.status_code)
return results

# Get all layer groups
@exception_handler
def get_all_layer_groups(
self, workspace: Optional[str] = None
) -> Union[LayerGroupsModel, GSResponse]:
Client = self.http_client
if workspace:
responses = Client.get(f"workspaces/{workspace}/layergroups")
else:
responses = Client.get("layergroups")
if responses.status_code == 200:
return LayerGroupsModel.model_validate(responses.json())
else:
results = self.response_recognise(responses.status_code)
return results

0 comments on commit 7ca8f1b

Please sign in to comment.