mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
Merge pull request #1489 from getredash/snowflake
Fix: data source wasn't saving in the UI
This commit is contained in:
@@ -57,9 +57,7 @@ class DataSourceListResource(BaseResource):
|
||||
if self.current_user.has_permission('admin'):
|
||||
data_sources = models.DataSource.all(self.current_org)
|
||||
else:
|
||||
data_sources = models.DataSource.all(
|
||||
self.current_org,
|
||||
group_ids=self.current_user.group_ids)
|
||||
data_sources = models.DataSource.all(self.current_org, group_ids=self.current_user.group_ids)
|
||||
|
||||
response = {}
|
||||
for ds in data_sources:
|
||||
@@ -95,6 +93,9 @@ class DataSourceListResource(BaseResource):
|
||||
name=req['name'],
|
||||
type=req['type'],
|
||||
options=config)
|
||||
|
||||
models.db.session.commit()
|
||||
|
||||
self.record_event({
|
||||
'action': 'create',
|
||||
'object_id': datasource.id,
|
||||
|
||||
Reference in New Issue
Block a user