Fixed delete db bug in portfolio

No shell of a portfolio is left in the view when a database has been
deleted in the backend.