fix: package description on /packages/{name} view

...What in the world happened here. We were literally just populating
`pkg` based on `pkgbase.packages.first()`. We should have been focusing
on the package passed by the context, which is always available when
`show_package_details` is true.

Closes #384

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-09-05 19:25:32 -07:00
parent 83ddbd220f
commit 0388b12896
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -1,4 +1,3 @@
{% set pkg = pkgbase.packages.first() %}
<table id="pkginfo"> <table id="pkginfo">
<tr> <tr>
<th>{{ "Git Clone URL" | tr }}:</th> <th>{{ "Git Clone URL" | tr }}:</th>
@ -20,13 +19,13 @@
</tr> </tr>
<tr> <tr>
<th>{{ "Description" | tr }}:</th> <th>{{ "Description" | tr }}:</th>
<td class="wrap">{{ pkg.Description }}</td> <td class="wrap">{{ package.Description }}</td>
</tr> </tr>
<tr> <tr>
<th>{{ "Upstream URL" | tr }}:</th> <th>{{ "Upstream URL" | tr }}:</th>
<td class="wrap"> <td class="wrap">
{% if pkg.URL %} {% if package.URL %}
<a href="{{ pkg.URL }}">{{ pkg.URL }}</a> <a href="{{ package.URL }}">{{ package.URL }}</a>
{% else %} {% else %}
{{ "None" | tr }} {{ "None" | tr }}
{% endif %} {% endif %}