rm reference to weight column.
This commit is contained in:
parent
d2a4e0b1fe
commit
bd287b096a
2 changed files with 3 additions and 5 deletions
|
@ -58,7 +58,6 @@ def add_card(
|
||||||
card_id = insert_card(
|
card_id = insert_card(
|
||||||
stripped_name,
|
stripped_name,
|
||||||
rarity,
|
rarity,
|
||||||
RARITY_TO_WEIGHT[rarity],
|
|
||||||
file_id
|
file_id
|
||||||
)
|
)
|
||||||
return card_id, file_id
|
return card_id, file_id
|
||||||
|
|
|
@ -150,12 +150,11 @@ def is_player_administrator(username: str) -> bool:
|
||||||
|
|
||||||
|
|
||||||
def insert_card(
|
def insert_card(
|
||||||
name: str, rarity: int, weight: float, file_id: str) -> int:
|
name: str, rarity: int, file_id: str) -> int:
|
||||||
'''Inserts a card'''
|
'''Inserts a card'''
|
||||||
CURSOR.execute(
|
CURSOR.execute(
|
||||||
'INSERT INTO cards (name, rarity, weight, file_id) VALUES \
|
'INSERT INTO cards (name, rarity, file_id) VALUES (?, ?, ?)',
|
||||||
(?, ?, ?, ?)',
|
(name, rarity, file_id)
|
||||||
(name, rarity, weight, file_id)
|
|
||||||
)
|
)
|
||||||
card_id = CURSOR.lastrowid
|
card_id = CURSOR.lastrowid
|
||||||
return card_id if card_id else 0
|
return card_id if card_id else 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue