Skip to content

Commit

Permalink
other name case
Browse files Browse the repository at this point in the history
  • Loading branch information
jdroenner committed Jan 13, 2025
1 parent b46affb commit ddfb493
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geoengine/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def from_dataset_name(cls, dataset_name: DatasetName) -> Resource:
@classmethod
def from_ml_model_name(cls, ml_model_name: str) -> Resource:
'''Create a resource from an ml model name'''
return Resource('ml_model', str(ml_model_name))
return Resource('mlModel', str(ml_model_name))

def to_api_dict(self) -> geoengine_openapi_client.Resource:
'''Convert to a dict for the API'''
Expand All @@ -120,8 +120,8 @@ def to_api_dict(self) -> geoengine_openapi_client.Resource:
inner = geoengine_openapi_client.ProjectResource(type="project", id=self.__id)
elif self.__type == "dataset":
inner = geoengine_openapi_client.DatasetResource(type="dataset", id=self.__id)
elif self.__type == "ml_model":
inner = geoengine_openapi_client.DatasetResource(type="ml_model", id=self.__id)
elif self.__type == "mlModel":
inner = geoengine_openapi_client.DatasetResource(type="mlModel", id=self.__id)

return geoengine_openapi_client.Resource(inner)

Expand Down

0 comments on commit ddfb493

Please sign in to comment.