.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):
|
def fileList(request):
|
||||||
category = request.POST.get("category", False)
|
category = request.POST.get("category", '')
|
||||||
typ = request.POST.get("type", False)
|
typ = request.POST.get("type", '')
|
||||||
search = request.POST.get("search", False)
|
search = request.POST.get("search", '')
|
||||||
page = request.POST.get("page", 1)
|
page = request.POST.get("page", 1)
|
||||||
qset = File.objects.all()
|
qset = File.objects.all()
|
||||||
if category:
|
if category != '':
|
||||||
qset = File.filter_category(category, qset)
|
qset = File.filter_category(category, qset)
|
||||||
if typ:
|
if typ != '':
|
||||||
qset = File.filter_type(typ, qset)
|
qset = File.filter_type(typ, qset)
|
||||||
if search:
|
if search != '':
|
||||||
qset = File.fts(search, qset)
|
qset = File.fts(search, qset)
|
||||||
d = {}
|
d = {}
|
||||||
d['files'] = []
|
d['files'] = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user