diff options
Diffstat (limited to 'server/models/actor')
-rw-r--r-- | server/models/actor/actor.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/actor/actor.ts b/server/models/actor/actor.ts index 88db241dc..d7afa727d 100644 --- a/server/models/actor/actor.ts +++ b/server/models/actor/actor.ts | |||
@@ -18,7 +18,7 @@ import { | |||
18 | import { activityPubContextify } from '@server/lib/activitypub/context' | 18 | import { activityPubContextify } from '@server/lib/activitypub/context' |
19 | import { getBiggestActorImage } from '@server/lib/actor-image' | 19 | import { getBiggestActorImage } from '@server/lib/actor-image' |
20 | import { ModelCache } from '@server/models/model-cache' | 20 | import { ModelCache } from '@server/models/model-cache' |
21 | import { getLowercaseExtension } from '@shared/core-utils' | 21 | import { forceNumber, getLowercaseExtension } from '@shared/core-utils' |
22 | import { ActivityIconObject, ActivityPubActorType, ActorImageType } from '@shared/models' | 22 | import { ActivityIconObject, ActivityPubActorType, ActorImageType } from '@shared/models' |
23 | import { AttributesOnly } from '@shared/typescript-utils' | 23 | import { AttributesOnly } from '@shared/typescript-utils' |
24 | import { | 24 | import { |
@@ -446,7 +446,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> { | |||
446 | } | 446 | } |
447 | 447 | ||
448 | static rebuildFollowsCount (ofId: number, type: 'followers' | 'following', transaction?: Transaction) { | 448 | static rebuildFollowsCount (ofId: number, type: 'followers' | 'following', transaction?: Transaction) { |
449 | const sanitizedOfId = parseInt(ofId + '', 10) | 449 | const sanitizedOfId = forceNumber(ofId) |
450 | const where = { id: sanitizedOfId } | 450 | const where = { id: sanitizedOfId } |
451 | 451 | ||
452 | let columnToUpdate: string | 452 | let columnToUpdate: string |