fix bug when deleting datasources

- set all models associate with deleted datasource to null