Skip to content

Commit

Permalink
fix: fixing parsing int
Browse files Browse the repository at this point in the history
  • Loading branch information
Claire.Nicholas authored and Claire.Nicholas committed Dec 5, 2023
1 parent b108ae0 commit 02f7128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ func (u *User) SetDefaultDashboard(d Dashboard) {
dID := d.GetID()

for a, dashboard := range u.GetDashboards() {
if dashboard == strconv.FormatInt(dID, 10) {
oldID, _ := strconv.ParseInt(dashboard, 10, 64)
if oldID == dID {
hold := dashboards[0]
dashboards[0] = dashboard
dashboards[a] = hold
Expand Down

0 comments on commit 02f7128

Please sign in to comment.