Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Jun 4, 2015
1 parent 5067550 commit af2a857
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions msg.go
Expand Up @@ -181,6 +181,7 @@ func (m *Messenger) callMeBack(conn *golem.Connection, msg *golem.Message) *gole

// persist a message
func (m *Messenger) saveMsg(bucket string, profileID string, msg *MSG) error {

if msg.ID == "" {
msg.ID = getUUID()
}
Expand Down
1 change: 1 addition & 0 deletions remix_test.go
Expand Up @@ -687,6 +687,7 @@ func testServer(t *testing.T) (*httptest.Server, *http.Client, *Remix) {
TemplatesExtensions: []string{".tmpl", ".html", ".tpl"},
SessMaxAge: 30,
SessionPath: "/",
MessagesBucket:"messages",
}
rx := NewRemix(cfg)
jar, err := cookiejar.New(nil)
Expand Down
7 changes: 6 additions & 1 deletion utils.go
Expand Up @@ -20,7 +20,12 @@ func marshalAndCreate(db nutz.Storage, obj interface{}, buck, key string, nest .
if err != nil {
return err
}
c := db.Create(buck, key, data, nest...)
if len(nest) > 0 {
c := db.Create(buck, key, data, nest...)
return c.Error

}
c := db.Create(buck, key, data)
return c.Error
}

Expand Down

0 comments on commit af2a857

Please sign in to comment.