Skip to content

Commit

Permalink
feat: add item id to the metadata dict
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia committed Nov 22, 2024
1 parent c2a3fc6 commit d535086
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ai4papi/routers/v1/catalog/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def get_metadata(
if error:
print(f" [Error] {error}")
metadata = {
"id": item_name,
"metadata_version": "2.0.0",
"title": item_name,
"summary": "",
Expand Down Expand Up @@ -267,6 +268,9 @@ def get_metadata(
# (ie. ignore the value coming from the metadata)
metadata['links']['docker_image'] = metadata['links']['docker_image'].strip('/ ')

# Add the item name
metadata['id'] = item_name

return metadata

def get_config(
Expand Down

0 comments on commit d535086

Please sign in to comment.