mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Fix data source models tests
This commit is contained in:
parent
8680ebe96f
commit
c386ff91d6
@ -402,8 +402,10 @@ class DataSource(BelongsToOrgMixin, db.Model):
|
||||
|
||||
@classmethod
|
||||
def create_with_group(cls, *args, **kwargs):
|
||||
data_source = cls.create(*args, **kwargs)
|
||||
DataSourceGroup.create(data_source=data_source, group=data_source.org.default_group)
|
||||
data_source = cls(*args, **kwargs)
|
||||
data_source_group = DataSourceGroup(data_source=data_source, group=data_source.org.default_group)
|
||||
|
||||
db.session.add_all([data_source, data_source_group])
|
||||
return data_source
|
||||
|
||||
def get_schema(self, refresh=False):
|
||||
|
Loading…
Reference in New Issue
Block a user