Skip to content

Commit

Permalink
Resolved error for delete_name operation in persistence_delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchita-dixit committed Mar 17, 2017
1 parent 117324f commit ae45331
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/runtime/system/persistence-delegate.org
Original file line number Diff line number Diff line change
Expand Up @@ -2191,20 +2191,16 @@ class TestPersistenceDelegate(TestCase):
This function delete existing name.
#+NAME: persistence_delete_name
#+BEGIN_SRC python
def delete_name(self, name):
record = self.get_name(name=name.get("name"))
current_app.logger.debug("running delete on developer"
" name = %s" % name)

def delete_name(self, n_id):
current_app.logger.debug("running delete on developer name")
record = Name.get_by_id(n_id)
if not record:
abort(404, 'No Name with id %s' % (n_id))
else:
try:
record.delete()
current_app.logger.debug("completed delete on developer"
" name = %s" % name)
current_app.logger.debug("completed delete on developer"
" name")
#db.session.delete(record)
#db.session.commit()
except Exception, e:
Expand Down

0 comments on commit ae45331

Please sign in to comment.