Skip to content

Commit

Permalink
Merge pull request #2 from apache/master
Browse files Browse the repository at this point in the history
updating my fork
  • Loading branch information
SpyderRivera authored Oct 31, 2017
2 parents d0cf07c + 5bc734b commit 95b4032
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
7 changes: 4 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
recursive-include superset/templates *
recursive-include superset/data *
recursive-include superset/migrations *
recursive-include superset/static *
recursive-exclude superset/static/docs *
recursive-exclude superset/static/spec *
recursive-exclude superset/static/assets/node_modules *
recursive-include superset/templates *
recursive-include superset/translations *
recursive-exclude tests *
recursive-include superset/data *
recursive-include superset/migrations *
16 changes: 8 additions & 8 deletions superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ class PostgresEngineSpec(BaseEngineSpec):

time_grains = (
Grain("Time Column", _('Time Column'), "{col}"),
Grain("second", _('second'), "DATE_TRUNC('second', {col})"),
Grain("minute", _('minute'), "DATE_TRUNC('minute', {col})"),
Grain("hour", _('hour'), "DATE_TRUNC('hour', {col})"),
Grain("day", _('day'), "DATE_TRUNC('day', {col})"),
Grain("week", _('week'), "DATE_TRUNC('week', {col})"),
Grain("month", _('month'), "DATE_TRUNC('month', {col})"),
Grain("quarter", _('quarter'), "DATE_TRUNC('quarter', {col})"),
Grain("year", _('year'), "DATE_TRUNC('year', {col})"),
Grain("second", _('second'), "DATE_TRUNC('second', \"{col}\")"),
Grain("minute", _('minute'), "DATE_TRUNC('minute', \"{col}\")"),
Grain("hour", _('hour'), "DATE_TRUNC('hour', \"{col}\")"),
Grain("day", _('day'), "DATE_TRUNC('day', \"{col}\")"),
Grain("week", _('week'), "DATE_TRUNC('week', \"{col}\")"),
Grain("month", _('month'), "DATE_TRUNC('month', \"{col}\")"),
Grain("quarter", _('quarter'), "DATE_TRUNC('quarter', \"{col}\")"),
Grain("year", _('year'), "DATE_TRUNC('year', \"{col}\")"),
)

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,8 @@ def get_perm(self):

def has_table(self, table):
engine = self.get_sqla_engine()
return engine.dialect.has_table(
engine, table.table_name, table.schema or None)
return engine.has_table(
table.table_name, table.schema or None)

def get_dialect(self):
sqla_url = url.make_url(self.sqlalchemy_uri_decrypted)
Expand Down

0 comments on commit 95b4032

Please sign in to comment.