Skip to content

Commit

Permalink
import: Add elif condition for 'processing_emojis' in 'import_uploads…
Browse files Browse the repository at this point in the history
…_s3'.

'processing_emojis' should have an 'elif' condition here as
we want the function to work for avatars, emojis or uploads
one at a time.
  • Loading branch information
rheaparekh committed Jun 18, 2018
1 parent f2b5f5a commit 0730087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zerver/lib/import_realm.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def import_uploads_s3(bucket_name: str, import_dir: Path, processing_avatars: bo
key.key = avatar_path
if record['s3_path'].endswith('.original'):
key.key += '.original'
if processing_emojis:
elif processing_emojis:
# For emojis we follow the function 'upload_emoji_image'
emoji_path = RealmEmoji.PATH_ID_TEMPLATE.format(
realm_id=record['realm_id'],
Expand Down

0 comments on commit 0730087

Please sign in to comment.