Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5717b9c853
2 changed files with 3 additions and 4 deletions
|
@ -80,8 +80,6 @@ def upload_file(name, file, resize=None):
|
||||||
print(e)
|
print(e)
|
||||||
print(req)
|
print(req)
|
||||||
print(req.text)
|
print(req.text)
|
||||||
if "File type invalid" in str(req.text): return "sex"
|
|
||||||
else: return
|
|
||||||
|
|
||||||
new_image = Image(
|
new_image = Image(
|
||||||
text=url,
|
text=url,
|
||||||
|
|
|
@ -34,10 +34,11 @@ def resize():
|
||||||
file.write(chunk)
|
file.write(chunk)
|
||||||
|
|
||||||
image = upload_from_file("resizing", "resizing", (100, 100))
|
image = upload_from_file("resizing", "resizing", (100, 100))
|
||||||
if image == "sex":
|
if image == None:
|
||||||
|
send_notification(1, u, "fail!")
|
||||||
u.resized = True
|
u.resized = True
|
||||||
g.db.add(u)
|
g.db.add(u)
|
||||||
elif image != None:
|
else:
|
||||||
u.profileurl = image
|
u.profileurl = image
|
||||||
u.resized = True
|
u.resized = True
|
||||||
g.db.add(u)
|
g.db.add(u)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue