Skip to content

Commit

Permalink
correct table name for user exports (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonsnir authored Dec 20, 2024
1 parent df6436d commit bb857db
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ func (User) TableName() string {
return tableName
}

func (UserForExport) TableName() string {
tableName := "users"

if namespace.GetNamespace() != "" {
return namespace.GetNamespace() + "_" + tableName
}

return tableName
}

func (u *User) BeforeCreate(tx *pop.Connection) error {
return u.BeforeUpdate(tx)
}
Expand Down

0 comments on commit bb857db

Please sign in to comment.