From 70662ac12fd247d160bc6c5cd1711c8d9988b30c Mon Sep 17 00:00:00 2001 From: erikvw Date: Mon, 4 Nov 2024 06:03:55 -0600 Subject: [PATCH] add exception if operational error when recereating --- edc_qareports/model_mixins/qa_report_model_mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edc_qareports/model_mixins/qa_report_model_mixin.py b/edc_qareports/model_mixins/qa_report_model_mixin.py index 37d88c0..8bc1ac9 100644 --- a/edc_qareports/model_mixins/qa_report_model_mixin.py +++ b/edc_qareports/model_mixins/qa_report_model_mixin.py @@ -51,7 +51,7 @@ def recreate_db_view(cls, drop: bool | None = None, verbose: bool | None = None) if drop: try: c.execute(f"drop view {cls._meta.db_table};") - except OperationalError as e: + except OperationalError: pass c.execute(f"create view {cls._meta.db_table} as {sql};") sys.stdout.write(