Add IRI to local resources (#1046)

* initial commit

* add remote trail/list

* fix errors

* update to use new IRIs

* use origin in migration instead

* use UnsafeWithoutHooks

* fix trail/list order of operations

* fix remote trail/list fetch

* fixes list document update

* fix errors

---------

Co-authored-by: Christian Beutel <>
This commit is contained in:
Flomp
2026-06-07 12:20:13 +02:00
committed by GitHub
parent f912a186a6
commit fc735130cc
19 changed files with 273 additions and 131 deletions

View File

@@ -129,7 +129,7 @@ func documentFromListRecord(r *core.Record, author *core.Record, includeShares b
totalDuration := 0.0
trails := len(r.GetStringSlice("trails"))
if r.GetString("iri") != "" {
if r.GetString("iri") != "" && !author.GetBool("isLocal") {
doc, err := documentFromRemoteRecord(r, "lists")
if err == nil {
totalElevationGain = doc["elevation_gain"].(float64)