fix 500 error
parent
362cd288d8
commit
d027e51faa
|
@ -526,11 +526,12 @@ def settings_images_profile(v):
|
|||
|
||||
if not imageurl: abort(400)
|
||||
|
||||
if v.highres and '/images/' in v.highres:
|
||||
if v.highres and '/images/' in v.highres and path.isfile(v.highres):
|
||||
os.remove(v.highres)
|
||||
|
||||
if v.profileurl and '/images/' in v.profileurl:
|
||||
if v.profileurl and '/images/' in v.profileurl and path.isfile(v.profileurl):
|
||||
os.remove(v.profileurl)
|
||||
|
||||
v.highres = highres
|
||||
v.profileurl = imageurl
|
||||
g.db.add(v)
|
||||
|
|
Loading…
Reference in New Issue