Skip to content

Commit 6a0d216

Browse files
authored
feat: Remove underscores from the getFullTableName method when they are present (#241)
* feat: remove the underscore from the getFullTableName method * fix: Remove underscores from the getFullTableName method when they are present
1 parent 9ad4075 commit 6a0d216

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adapter.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ func (a *Adapter) getTableInstance() *CasbinRule {
391391

392392
func (a *Adapter) getFullTableName() string {
393393
if a.tablePrefix != "" {
394+
if strings.HasSuffix(a.tablePrefix, "_") {
395+
return a.tablePrefix + a.tableName
396+
}
394397
return a.tablePrefix + "_" + a.tableName
395398
}
396399
return a.tableName

0 commit comments

Comments
 (0)