Skip to content

Commit

Permalink
The libary field of the frameworks detail view now display its name i…
Browse files Browse the repository at this point in the history
…nstead of its uuid
  • Loading branch information
monsieurswag committed Apr 9, 2024
1 parent 899317d commit 60093cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/core/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ class Meta:

class FrameworkReadSerializer(BaseModelSerializer):
folder = FieldsRelatedField()
libary = FieldsRelatedField(["name"])

class Meta:
model = Framework
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/routes/(app)/frameworks/[id=uuid]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
<ul class="text-sm">
<li class="text-gray-600 list-none">
{#if value}
{#if Array.isArray(value)}
{#if key === "library"}
{@const itemHref = `/libraries/${value.urn}`}
<a href={itemHref} class="anchor">{value.name}</a>
{:else if Array.isArray(value)}
<ul>
{#each value as val}
<li>
Expand Down

0 comments on commit 60093cd

Please sign in to comment.