Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

Commit

Permalink
Fixes empty sites on the my profile page.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasd committed Aug 18, 2016
1 parent ec18730 commit 929ad88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion walkthrough.go
Expand Up @@ -102,7 +102,7 @@ func walkthroughService(ec *ab.EntityController, search *search.SearchService, b
db := ab.GetDB(r)
uid := ab.GetSession(r)["uid"]

rows, err := db.Query("SELECT DISTINCT steps->0->'arg0' AS site FROM walkthrough WHERE uid = $1 ORDER BY site", uid)
rows, err := db.Query("SELECT DISTINCT steps->0->'arg0' AS site FROM walkthrough WHERE uid = $1 AND published ORDER BY site", uid)
ab.MaybeFail(http.StatusInternalServerError, err)
defer rows.Close()

Expand Down Expand Up @@ -275,6 +275,11 @@ func (d walkthroughEntityDelegate) AlterSQL(sql string) string {
ON public.walkthrough
USING btree
(((steps -> 0) ->> 'arg0'::text) COLLATE pg_catalog."default");
CREATE INDEX walkthrough_published_idx
ON public.walkthrough
USING btree
(published);
`
}

Expand Down

0 comments on commit 929ad88

Please sign in to comment.