Исправлена ошибка фотографии профиля
This commit is contained in:
parent
5cf1bf9fde
commit
a4ded16d12
BIN
db/moona_data.db
BIN
db/moona_data.db
Binary file not shown.
2
main.py
2
main.py
@ -181,6 +181,7 @@ def edit_profile(logins):
|
||||
photo = None
|
||||
if form.del_photo.data:
|
||||
help_arg = photo
|
||||
ph_f = False
|
||||
photo = '../static/img/None_logo.png'
|
||||
if form.submit2.data:
|
||||
user = session.query(User).filter(User.login == logins).first()
|
||||
@ -198,6 +199,7 @@ def edit_profile(logins):
|
||||
if help_arg:
|
||||
os.remove(help_arg)
|
||||
help_arg = False
|
||||
photo = '../static/img/None_logo.png'
|
||||
user.photo = photo
|
||||
session.commit()
|
||||
if user.email == form.email.data:
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB |
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if ph_f %}
|
||||
{% if ph_f == 1 %}
|
||||
{{ form.del_photo(type="submit", class="btn btn-primary") }}
|
||||
{% for error in form.del_photo.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user