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 { Notes } from '../../../../models';
|
||||
import { Not } from 'typeorm';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
import { Note } from '../../../../models/entities/note';
|
||||
import { name, schema } from '../schemas/notes';
|
||||
|
||||
|
@ -29,7 +29,7 @@ export default class NotesChart extends Chart<NotesLog> {
|
|||
protected async fetchActual(): Promise<DeepPartial<NotesLog>> {
|
||||
const [localCount, remoteCount] = await Promise.all([
|
||||
Notes.count({ userHost: null }),
|
||||
Notes.count({ userHost: Not(null) })
|
||||
Notes.count({ userHost: Not(IsNull()) })
|
||||
]);
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue