if gallery path doesn't exists, show empty gallery
This commit is contained in:
@@ -47,7 +47,10 @@ def get_image_list(folder_name):
|
||||
|
||||
|
||||
def get_folder_list():
|
||||
return next(os.walk(settings.MEDIA_ROOT + "/" + gallery_path))[1]
|
||||
if os.path.exists(settings.MEDIA_ROOT + "/" + gallery_path):
|
||||
return next(os.walk(settings.MEDIA_ROOT + "/" + gallery_path))[1]
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def create_thumbs(folder_path):
|
||||
|
||||
Reference in New Issue
Block a user