Add check_clothe function to verify clothing existence in the database
This commit is contained in:
@@ -95,6 +95,7 @@ def fetch_all_pieces():
|
||||
result = session.query(Items.pieces).all()
|
||||
return [row[0] for row in session.query(Items.pieces).all()]
|
||||
|
||||
#Checks if clothe is in db
|
||||
def check_clothe(clothe_type):
|
||||
exists = session.query(Items.clothes).filter_by(clothes=clothe_type).first() is not None
|
||||
return exists
|
||||
|
||||
Reference in New Issue
Block a user