Пример #1
0
 def modify_trade_secondary_book(trade_id, book):
     """This function change the secondary book of a trade."""
     Trade.get(
             Trade.id == trade_id
     ).update(Trade.book_two == book).execute()
Пример #2
0
 def modify_trade_primary_user(trade_id, user):
     """This function change the secondary user of a trade."""
     Trade.get(
             Trade.id == trade_id
     ).update(Trade.user_two == user).execute()
Пример #3
0
 def modify_trade_primary_book(trade_id, book):
     """This function change the primary book of a trade."""
     Trade.get(
             Trade.id == trade_id
     ).update(Trade.book_one == book).execute()
Пример #4
0
 def delete_trade(trade_id):
     Trade.get(
             Trade.id == trade_id
     ).delete_instance()