Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def add_contact(self, owner, contact):
- session = self._session_class()
- new_contact = Contact(owner_id=owner.client_id, contact_id=contact.client_id)
- try:
- session.add(new_contact)
- session.commit()
- except:
- print('failed to add contact')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement