mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
Fix formatting
This commit is contained in:
parent
71de84bc14
commit
775ab27531
2 changed files with 18 additions and 3 deletions
|
@ -11,7 +11,13 @@ from markupsafe import Markup
|
|||
from werkzeug.security import check_password_hash, generate_password_hash
|
||||
from wtforms.fields.core import Label, SelectField, SelectMultipleField
|
||||
from wtforms.fields.html5 import DateField, DecimalField, URLField
|
||||
from wtforms.fields.simple import BooleanField, PasswordField, StringField, SubmitField, HiddenField
|
||||
from wtforms.fields.simple import (
|
||||
BooleanField,
|
||||
HiddenField,
|
||||
PasswordField,
|
||||
StringField,
|
||||
SubmitField,
|
||||
)
|
||||
from wtforms.validators import (
|
||||
URL,
|
||||
DataRequired,
|
||||
|
@ -326,7 +332,7 @@ class BillForm(FlaskForm):
|
|||
bill.payer_id = self.payer.data
|
||||
bill.amount = self.amount.data
|
||||
bill.what = self.what.data
|
||||
tag = list(set(part[1:] for part in bill.what.split() if part.startswith('#')))
|
||||
tag = list(set(part[1:] for part in bill.what.split() if part.startswith("#")))
|
||||
if tag:
|
||||
bill.tag = tag[0]
|
||||
bill.external_link = self.external_link.data
|
||||
|
|
|
@ -462,7 +462,16 @@ def import_project(file, project):
|
|||
json_file = json.load(file)
|
||||
|
||||
# Check if JSON is correct
|
||||
attr = ["what", "tag", "payer_name", "payer_weight", "amount", "currency", "date", "owers"]
|
||||
attr = [
|
||||
"what",
|
||||
"tag",
|
||||
"payer_name",
|
||||
"payer_weight",
|
||||
"amount",
|
||||
"currency",
|
||||
"date",
|
||||
"owers",
|
||||
]
|
||||
attr.sort()
|
||||
currencies = set()
|
||||
for e in json_file:
|
||||
|
|
Loading…
Reference in a new issue