.serializeArray() sends empty strings so deal with empty strings
This commit is contained in:
parent
2710ff5709
commit
ae3445e43d
|
@ -232,16 +232,16 @@ def deleteFile(request):
|
|||
|
||||
|
||||
def fileList(request):
|
||||
category = request.POST.get("category", False)
|
||||
typ = request.POST.get("type", False)
|
||||
search = request.POST.get("search", False)
|
||||
category = request.POST.get("category", '')
|
||||
typ = request.POST.get("type", '')
|
||||
search = request.POST.get("search", '')
|
||||
page = request.POST.get("page", 1)
|
||||
qset = File.objects.all()
|
||||
if category:
|
||||
if category != '':
|
||||
qset = File.filter_category(category, qset)
|
||||
if typ:
|
||||
if typ != '':
|
||||
qset = File.filter_type(typ, qset)
|
||||
if search:
|
||||
if search != '':
|
||||
qset = File.fts(search, qset)
|
||||
d = {}
|
||||
d['files'] = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user