Skip to content

Commit

Permalink
Added insert method for new clients and address
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxskar committed Mar 25, 2013
1 parent adcfcaa commit ccb8393
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ordenley/controllers/controller.py
Expand Up @@ -59,8 +59,10 @@ def client_returned_values(self, modification=None, mod_obj=None,
Args : modification , mod_obj , new_object , old_id
values : client , delete , client , client.id
: , modified , , -- modify or delete client with old id old_id
: , new , , None
: address , delete , address , address.id
: , modified , , -- modify or delete address with old id old_id
: , new , , None
: view , delete , view_object , None -- Delete the client view_object
"""
manager = None
Expand All @@ -73,6 +75,8 @@ def client_returned_values(self, modification=None, mod_obj=None,
manager.delete(old_id)
elif mod_obj == "modified":
manager.modify(new_object, old_id)
elif mod_obj == "new":
manager.insert(new_object)
if modification == "view":
del new_object

Expand Down

0 comments on commit ccb8393

Please sign in to comment.