Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixes empty sites on the my profile page.

  • Loading branch information
tamasd committed Aug 18, 2016
1 parent ec18730 commit 929ad88a54bb0513880e7c4de70b489cf36fec33
Showing with 6 additions and 1 deletion.
  1. +6 −1 walkthrough.go
@@ -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()

@@ -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);
`
}

0 comments on commit 929ad88

Please sign in to comment.
You can’t perform that action at this time.