Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/openprescribing/frontend/management/commands/measure_sql/lpomnibusview.sql b/openprescribing/frontend/manag
- ement/commands/measure_sql/lpomnibusview.sql
- index e5146c2..40f3687 100644
- --- a/openprescribing/frontend/management/commands/measure_sql/lpomnibusview.sql
- +++ b/openprescribing/frontend/management/commands/measure_sql/lpomnibusview.sql
- @@ -94,15 +94,6 @@ SELECT
- numerator,
- denominator
- FROM
- - {project}.{measures}.practice_data_lpomnibus
- -
- -UNION ALL
- -SELECT
- - TIMESTAMP(month) AS month,
- - practice_id AS practice,
- - numerator,
- - denominator
- -FROM
- {project}.{measures}.practice_data_lpoxycodone
- UNION ALL
- diff --git a/openprescribing/gcutils/bigquery.py b/openprescribing/gcutils/bigquery.py
- index 710c13a..c1de002 100644
- --- a/openprescribing/gcutils/bigquery.py
- +++ b/openprescribing/gcutils/bigquery.py
- @@ -114,7 +114,7 @@ class Client(object):
- data=resource
- )
- except NotFound as e:
- - assert 'Not found: Dataset' in str(e)
- + assert 'Not found: Dataset' in str(e), "Unexpected error %s" % e
- self.create_dataset()
- self.gcbq_client._connection.api_request(
- method='POST',
- @@ -133,9 +133,12 @@ class Client(object):
- try:
- table.create()
- except NotFound as e:
- - assert 'Not found: Dataset' in str(e)
- + assert 'Not found: Dataset' in str(e), "Unexpected error %s" % e
- self.create_dataset()
- - table.create()
- + try:
- + table.create()
- + except Conflict:
- + pass
- return Table(table, self.project_name)
- def query(self, sql, legacy=False, **options):
- ~
Add Comment
Please, Sign In to add comment