fix bug when deleting datasources

Studio

- set all models associate with deleted datasource to null

@seanbrookes please review