Office driver api get data works
This commit is contained in:
		| @@ -14,21 +14,15 @@ def set_card_main(user_id): | ||||
|         .query(Card_Card) \ | ||||
|         .filter(Card_Card.user_id == user_id) \ | ||||
|         .count() | ||||
|     print(get_card_count) | ||||
|     if get_card_count > 0: | ||||
|         print("true") | ||||
|  | ||||
|         get_old_card = db.session \ | ||||
|             .query(Card_Card) \ | ||||
|             .filter(Card_Card.main_card == True) \ | ||||
|             .filter(Card_Card.user_id == user_id) \ | ||||
|             .first() | ||||
|         print(get_old_card.id) | ||||
|  | ||||
|         get_old_card.main_card = False | ||||
|  | ||||
|         db.session.add(get_old_card) | ||||
|  | ||||
|         db.session.commit() | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user