Skip to content

Commit

Permalink
fix stats update query
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Dec 13, 2024
1 parent 79f4f3e commit c48c5e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func (r *SchemaRepository) CalculateStats(uid string) error {
from schemapart sp where sp.schema_uid = s.uid
),
total_parts = (select count(*) from schemapart sp where sp.schema_uid = s.uid),
stars = (select count(*) from user_schema_star where schema_uid = $1)
where uid = ?
stars = (select count(*) from user_schema_star where schema_uid = s.uid)
where s.uid = ?;
`, uid).Error
}

Expand Down

0 comments on commit c48c5e3

Please sign in to comment.