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

Commit 60b702a

Browse files
authored
Merge pull request django-ckeditor#411 from gamingexperience/fix/restric-by-user-exception
A TypeError Exception is raised when CKEDITOR_RESTRICT_BY_USER is True
2 parents 8132025 + 645f8d7 commit 60b702a

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)