Skip to content

Commit

Permalink
fix: fix error handling in loadPolicyLine() (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
maocaicai authored Dec 8, 2022
1 parent 8d7ae4b commit 0031f6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,9 @@ func loadPolicyLine(line CasbinRule, model model.Model) error {
p = p[:index]
err := persist.LoadPolicyArray(p, model)
if err != nil {
return nil
return err
}
return err
return nil
}

// LoadPolicy loads policy from database.
Expand Down

0 comments on commit 0031f6b

Please sign in to comment.