Skip to content
Snippets Groups Projects
Commit e543a6d8 authored by Romin's avatar Romin :eye:
Browse files

Adapted to new URI format for application_profiles and metadata instances

parent f0484ba0
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ class MetadataForm(InputForm):
if "class" in element:
flags |= MetadataForm.CONTROLLED
uri = element["class"]
instance = client.static.instance(resource.project.id, uri)
instance = client.static.instance(uri)
if lang not in instance or len(instance[lang]) == 0:
lang = "en"
voc = {}
......
......@@ -310,8 +310,7 @@ class Resource:
Application profile of the resource, either parsed or raw.
"""
return self.client.static.application_profile(\
self.profile, self.id, parse)
return self.client.static.application_profile(self.profile, parse)
###############################################################################
......
......@@ -321,8 +321,7 @@ class StaticServer:
###############################################################################
def application_profile(self, path: str, id: str = None,
parse: bool = False) -> dict:
def application_profile(self, path: str, parse: bool = False) -> dict:
"""
Retrieves a specific application profile.
......@@ -343,7 +342,7 @@ class StaticServer:
An application profile as a dictionary.
"""
uri = self.client.uri("Metadata", "Metadata", "profiles", path, id)
uri = self.client.uri("Metadata", "Metadata", "profiles", path)
if uri in self.cache:
profile = self.cache[uri]
else:
......@@ -356,7 +355,7 @@ class StaticServer:
###############################################################################
def instance(self, id: str, link: str) -> dict:
def instance(self, link: str) -> dict:
"""
Returns a static project instance
......@@ -374,7 +373,7 @@ class StaticServer:
instance
"""
uri = self.client.uri("Metadata", "Metadata", "instances", id, link)
uri = self.client.uri("Metadata", "Metadata", "instances", link)
if uri in self.cache:
data = self.cache[uri]
else:
......
......@@ -16,4 +16,4 @@
###############################################################################
# Do not set version to 1.0.0 before Coscine end of pilot phase
__version__ = "0.5.4"
\ No newline at end of file
__version__ = "0.5.5"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment