def delete_from_user_favorite(user_id, collection_id): user_liked = Session.query(UserLikedCollection).filter( UserLikedCollection.collectionID == collection_id).filter( UserLikedCollection.userID == user_id).first() Session.del_and_commit(user_liked)
def delete_single_card_from_collection(single_card_id): Session.del_and_commit(CardContext.get_card_by_id(single_card_id))
def delete_collection(collection_id): Session.del_and_commit( CardsCollectionContext.get_collection_by_id(collection_id)) return True