Skip to content

Commit

Permalink
group releaser upload form autofil uses releaser index value instead …
Browse files Browse the repository at this point in the history
…of the humanized name. this is to fix mismatched values getting stored in the database.
  • Loading branch information
bengarrett committed Oct 14, 2024
1 parent de9185a commit 0b00c29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion handler/app/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ func Releasers(c echo.Context, db *sql.DB, logger *zap.SugaredLogger, uri string
data["demozoo"] = strconv.Itoa(int(demozoo.Find(uri)))
data["sixteen"] = sixteen.Find(uri)
data["website"] = site.Find(uri)
data["uploader-releaser"] = s
data["uploader-releaser-index"] = releaser.Index(uri)
data[records] = fs
switch uri {
case "independent":
Expand Down
2 changes: 1 addition & 1 deletion model/releaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (r *Releasers) Magazine(ctx context.Context, exec boil.ContextExecutor) err
return nil
}

// Slugs saves URL friendly strings to the Group names.
// Slugs sets URL friendly strings to the Group names.
func (r *Releasers) Slugs() {
for _, releaser := range *r {
releaser.Unique.URI = helper.Slug(releaser.Unique.Name)
Expand Down
2 changes: 1 addition & 1 deletion view/app/uploader_modal.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- `layout-htmx.js`, a `afterRequest()` method must be used to handle the server response.
- */}}
{{- $screenshot := "A screenshot can be included in the archive."}}
{{- $releasername := index . "uploader-releaser"}}
{{- $releasername := index . "uploader-releaser-index"}}
{{- $delay := "200ms" }}
{{- /* check if the event is a KeyboardEvent to prevent double rendering on datalists
source: https://turriate.com/articles/using-datalist-for-typeahead-htmx */ -}}
Expand Down

0 comments on commit 0b00c29

Please sign in to comment.