fix has_file
This commit is contained in:
parent
c77c5ea829
commit
fb73142de5
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ class DocumentAdmin(admin.ModelAdmin):
|
|||
actions = ('make_published', 'make_hidden')
|
||||
|
||||
def has_file(self, document: Document):
|
||||
return document.file is not None and document.file != ''
|
||||
return document.file is not None and str(document.file).strip() != ''
|
||||
|
||||
has_file.boolean = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue