Skip to content

Commit

Permalink
Merge pull request #230 from intuitem/CA-356-fix-library-display-for-…
Browse files Browse the repository at this point in the history
…referential

The libary field of the frameworks detail view now display its name instead of its uuid
  • Loading branch information
eric-intuitem authored Apr 9, 2024
2 parents 1927c90 + 717a06d commit c1a1706
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()
library = FieldsRelatedField(["name","urn"])

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 c1a1706

Please sign in to comment.