Skip to content

Commit

Permalink
manager: fix sql default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeneas Rekkas (arekkas) committed Oct 23, 2016
1 parent 1f6c872 commit e877152
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ladon.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Ladon struct {
func (g *Ladon) IsAllowed(r *Request) (err error) {
policies, err := g.Manager.FindPoliciesForSubject(r.Subject)
if err != nil {
return errors.Wrap(err, "")
return err
}

return g.doPoliciesAllow(r, policies)
Expand Down
2 changes: 1 addition & 1 deletion manager_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (s *SQLManager) CreateSchemas() error {

// Create inserts a new policy
func (s *SQLManager) Create(policy Policy) (err error) {
conditions := []byte("[]")
conditions := []byte("{}")
if policy.GetConditions() != nil {
cs := policy.GetConditions()
conditions, err = json.Marshal(&cs)
Expand Down

0 comments on commit e877152

Please sign in to comment.