Fix bugs
Use Not(IsNull())
This commit is contained in:
parent
5a3ea38bbf
commit
e7dd5e155d
7 changed files with 27 additions and 13 deletions
|
|
@ -2,7 +2,7 @@ import autobind from 'autobind-decorator';
|
|||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '../../../../misc/schema';
|
||||
import { DriveFiles } from '../../../../models';
|
||||
import { Not } from 'typeorm';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
import { DriveFile } from '../../../../models/entities/drive-file';
|
||||
import { name, schema } from '../schemas/drive';
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ export default class DriveChart extends Chart<DriveLog> {
|
|||
protected async fetchActual(): Promise<DeepPartial<DriveLog>> {
|
||||
const [localCount, remoteCount, localSize, remoteSize] = await Promise.all([
|
||||
DriveFiles.count({ userHost: null }),
|
||||
DriveFiles.count({ userHost: Not(null) }),
|
||||
DriveFiles.count({ userHost: Not(IsNull()) }),
|
||||
DriveFiles.clacDriveUsageOfLocal(),
|
||||
DriveFiles.clacDriveUsageOfRemote()
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue