Skip to content

Commit

Permalink
hotfix: calculate usage properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-gs committed Nov 15, 2023
1 parent 262d6da commit e594698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/services/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ module.exports = (Model, App) => {
const getUsage = async (user) => {
const targetUser = await Model.users.findOne({ where: { username: user.bridgeUser } });
const usage = await Model.file.findAll({
where: { user_id: targetUser.id, status: 'EXISTS' },
where: { user_id: targetUser.id, status: { [Op.ne]: 'DELETED' } },
attributes: [[fn('sum', col('size')), 'total']],
raw: true,
});
Expand Down

0 comments on commit e594698

Please sign in to comment.