Remove reference to deleted fields on location detail view

Fixes a 'failed to render template' error.
This commit is contained in:
Eli Ribble 2026-01-07 15:12:49 +00:00
parent bf4c5d5c71
commit 8c1026a653
2 changed files with 3 additions and 15 deletions

View file

@ -72,8 +72,7 @@ type BreedingSourceDetail struct {
Creator string `json:"creator"`
EditedAt *time.Time `json:"editedAt"`
Editor string `json:"editor"`
//Updated *time.Time `json:"updated"`
Comments string `json:"comments"`
Comments string `json:"comments"`
}
type TrapNearby struct {
@ -151,8 +150,7 @@ type TrapData struct {
Editor string `json:"editor"`
LastEditedDate *time.Time `json:"lastEditedDate"`
LastEditedUser string `json:"lastEditedUser"`
//Updated *time.Time `json:"updated"`
Comments string `json:"comments"`
Comments string `json:"comments"`
}
type Treatment struct {
@ -278,8 +276,7 @@ func toTemplateTrapData(trap_data models.FieldseekerTrapdatumSlice) ([]TrapData,
Editor: r.Editor.GetOr(""),
LastEditedDate: getTimeOrNull(r.LastEditedDate),
LastEditedUser: r.LastEditedUser.GetOr(""),
//Updated: r.Updated,
Comments: r.Comments.GetOr(""),
Comments: r.Comments.GetOr(""),
})
}
return results, nil
@ -400,7 +397,6 @@ func toTemplateBreedingSource(source *models.FieldseekerPointlocation) *Breeding
Creator: source.Creator.GetOr(""),
EditedAt: getTimeOrNull(source.Editdate),
Editor: source.Editor.GetOr(""),
//Updated: source.Updated,
Comments: source.Comments.GetOr(""),
}
}

View file

@ -69,10 +69,6 @@
<div class="col-md-6">
<div class="source-id">Source ID: {{ .Source.GlobalID }}</div>
<table class="info-table">
<tr>
<td class="info-label">Location:</td>
<td>{{ .Source.LatLng|latLngDisplay }}</td>
</tr>
<tr>
<td class="info-label">Access:</td>
<td>{{ .Source.AccessDescription }}</td>
@ -217,10 +213,6 @@
<td class="info-label">Next action date scheduled:</td>
<td>{{ .Source.NextActionScheduledDate|timeSince }}</td>
</tr>
<tr>
<td class="info-label">Updated:</td>
<td>{{ .Source.Updated|timeSince }}</td>
</tr>
<tr>
<td class="info-label">Treatment Cadence:</td>
<td>Not implemented</td>