Add weights
This commit is contained in:
parent
b92f8490a1
commit
b0b656dd9d
12
new_meet
12
new_meet
|
@ -32,19 +32,19 @@ meet_id = csr.fetchone().id
|
||||||
|
|
||||||
for date in meet["dates"]:
|
for date in meet["dates"]:
|
||||||
csr.execute(
|
csr.execute(
|
||||||
"insert into date(date, display, meet) values(%s, %s, %s)",
|
"insert into date(date, display, w, meet) values(%s, %s, %s, %s)",
|
||||||
(date["date"], date.get("display"), meet_id,)
|
(date["date"], date.get("display"), date.get("w", 1), meet_id,)
|
||||||
)
|
)
|
||||||
|
|
||||||
for time in meet["times"]:
|
for time in meet["times"]:
|
||||||
csr.execute(
|
csr.execute(
|
||||||
"insert into time(time, display, meet) values(%s, %s, %s)",
|
"insert into time(time, display, w, meet) values(%s, %s, %s, %s)",
|
||||||
(time["time"], time.get("display"), meet_id,)
|
(time["time"], time.get("display"), time.get("w", 1), meet_id,)
|
||||||
)
|
)
|
||||||
|
|
||||||
for place in meet["places"]:
|
for place in meet["places"]:
|
||||||
csr.execute(
|
csr.execute(
|
||||||
"insert into place(name, meet) values(%s, %s)",
|
"insert into place(name, w, meet) values(%s, %s, %s)",
|
||||||
(place["name"], meet_id,)
|
(place["name"], place.get("w", 1), meet_id,)
|
||||||
)
|
)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
Loading…
Reference in New Issue