Skip to content

Commit

Permalink
fix: add sameAs links to details
Browse files Browse the repository at this point in the history
Closes: #56
b1rger committed Feb 29, 2024
1 parent a975c56 commit 13b7fea
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions viecpro_typesense_detail/details/detail_court.py
Original file line number Diff line number Diff line change
@@ -131,6 +131,7 @@ def main(offset:int=0) -> Dict[str, Any]:
# NOTE: sources contain the bibtex json directly, they could be parsed to a) conform to the naming scheme and b) get rid of uneccessary data
res["sources"] = get_references_for_instance(instance)
res["ampel"] = ampel(instance)
res["sameAs"] = [uri.uri for uri in instance.uri_set.all() if not uri.uri.startswith("https://viecpro.acdh.oeaw.ac.at")]

results.append(res)

1 change: 1 addition & 0 deletions viecpro_typesense_detail/details/detail_event.py
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ def main(offset: int = 0) -> Dict[str, Any]:
# NOTE: sources contain the bibtex json directly, they could be parsed to a) conform to the naming scheme and b) get rid of uneccessary data
res["sources"] = get_references_for_instance(instance)
res["ampel"] = ampel(instance)
res["sameAs"] = [uri.uri for uri in instance.uri_set.all() if not uri.uri.startswith("https://viecpro.acdh.oeaw.ac.at")]

results.append(res)

1 change: 1 addition & 0 deletions viecpro_typesense_detail/details/detail_institution.py
Original file line number Diff line number Diff line change
@@ -91,6 +91,7 @@ def main(offset: int = 0) -> Dict[str, Any]:
# NOTE: sources contain the bibtex json directly, they could be parsed to a) conform to the naming scheme and b) get rid of uneccessary data
res["sources"] = get_references_for_instance(instance)
res["ampel"] = ampel(instance)
res["sameAs"] = [uri.uri for uri in instance.uri_set.all() if not uri.uri.startswith("https://viecpro.acdh.oeaw.ac.at")]

results.append(res)

1 change: 1 addition & 0 deletions viecpro_typesense_detail/details/detail_person.py
Original file line number Diff line number Diff line change
@@ -218,6 +218,7 @@ def main(offset:int=0):
res["model"] = model.__name__
res["ampel"] = ampel(instance)
res["allowance"] = [text.text for text in instance.text.filter(kind__name="Diverses")]
res["sameAs"] = [uri.uri for uri in instance.uri_set.all() if not uri.uri.startswith("https://viecpro.acdh.oeaw.ac.at")]
results.append(res)

return {"schema": schema, "results": results}
1 change: 1 addition & 0 deletions viecpro_typesense_detail/details/detail_place.py
Original file line number Diff line number Diff line change
@@ -93,6 +93,7 @@ def main(offset:int=0) -> Dict[str, Any]:
res["object_id"] = str(instance.id)
res["model"] = model.__name__
res["ampel"] = ampel(instance)
res["sameAs"] = [uri.uri for uri in instance.uri_set.all() if not uri.uri.startswith("https://viecpro.acdh.oeaw.ac.at")]
results.append(res)

return {"schema":schema, "results":results}

0 comments on commit 13b7fea

Please sign in to comment.