Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 645f8d7

Browse files
author
Pablo Chinea
committed
Catches TypeError exception when CKEDITOR_RESTRICT_BY_USER is setted to True.
1 parent 8132025 commit 645f8d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ckeditor_uploader/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_upload_filename(upload_name, user):
2626
if RESTRICT_BY_USER:
2727
try:
2828
user_prop = getattr(user, RESTRICT_BY_USER)
29-
except AttributeError:
29+
except (AttributeError, TypeError):
3030
user_prop = getattr(user, 'get_username')
3131

3232
if callable(user_prop):

0 commit comments

Comments
 (0)