Skip to content

Commit

Permalink
Merge branch 'acdh-oeaw:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 authored Jan 24, 2024
2 parents 49651b6 + 8c76007 commit fbbaef6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions apis_core/api_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def render(self, data, media_type=None, renderer_context=None):
rel2 = re.match("^{}[a-z]*".format(r2), rel)
if rel2:
source = r
elif r.endswith("A"):
elif r.endswith("a"):
source = r
elif r.endswith("B"):
elif r.endswith("b"):
target = r
rel2 = re.match("^[a-z]*?{}$".format(r2), rel)
if rel2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,9 @@ <h4 class="text-left">
</th>
<td>
{% for x in object.collection.all %}
<li>
{{ x }}
</li>
{{ x }}<br />
{% endfor %}

</td>
</tr>
{% endif %}
Expand Down
8 changes: 2 additions & 6 deletions apis_core/apis_entities/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,8 @@ def test_020_api_list_view(self):
r = client.get(value)
self.assertTrue(r.status_code, 200)
if key.startswith("relation"):
try:
r = client.get(f"{value}?format=json%2Bnet")
self.assertTrue(r.status_code, 200)
except Exception as e:
print(value, e)
continue
r = client.get(f"{value}?format=json%2Bnet")
self.assertTrue(r.status_code, 200)

def test_021_api_detail_view(self):
item = Person.objects.last()
Expand Down

0 comments on commit fbbaef6

Please sign in to comment.