diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-08 10:37:08 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-08 10:37:08 +0200 |
commit | 505319061e28da647c2e9af6e65721d6b8f9da1b (patch) | |
tree | afc843e766d680e111f1e96c3b377ded4da39945 /server/models/avatar/avatar.ts | |
parent | 4232d092bbba9a0bc0dfb0e82322829970c49454 (diff) | |
download | PeerTube-505319061e28da647c2e9af6e65721d6b8f9da1b.tar.gz PeerTube-505319061e28da647c2e9af6e65721d6b8f9da1b.tar.zst PeerTube-505319061e28da647c2e9af6e65721d6b8f9da1b.zip |
Fix avatar update
Diffstat (limited to 'server/models/avatar/avatar.ts')
-rw-r--r-- | server/models/avatar/avatar.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/models/avatar/avatar.ts b/server/models/avatar/avatar.ts index 5d73e24fa..303aebcc2 100644 --- a/server/models/avatar/avatar.ts +++ b/server/models/avatar/avatar.ts | |||
@@ -23,7 +23,10 @@ export class AvatarModel extends Model<AvatarModel> { | |||
23 | @AfterDestroy | 23 | @AfterDestroy |
24 | static removeFilesAndSendDelete (instance: AvatarModel) { | 24 | static removeFilesAndSendDelete (instance: AvatarModel) { |
25 | logger.info('Removing avatar file %s.', instance.filename) | 25 | logger.info('Removing avatar file %s.', instance.filename) |
26 | return instance.removeAvatar() | 26 | |
27 | // Don't block the transaction | ||
28 | instance.removeAvatar() | ||
29 | .catch(err => logger.error('Cannot remove avatar file %s.', instance.filename, err)) | ||
27 | } | 30 | } |
28 | 31 | ||
29 | toFormattedJSON (): Avatar { | 32 | toFormattedJSON (): Avatar { |