Skip to content

Commit

Permalink
Force use open_rosa db when updated sequences on user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
noliveleger committed Jun 21, 2024
1 parent 5e1d710 commit aaf91d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kpi/deployment_backends/kc_access/shadow_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
ProgrammingError,
connections,
models,
router,
transaction,
)
from django.utils import timezone
Expand Down Expand Up @@ -67,7 +66,7 @@ def update_autofield_sequence(model):
query = sql_template.format(
table=model._meta.db_table, column=autofield.column
)
connection = connections[router.db_for_write(model)]
connection = connections[settings.OPENROSA_DB_ALIAS]
with connection.cursor() as cursor:
cursor.execute(query)

Expand Down

0 comments on commit aaf91d7

Please sign in to comment.