Skip to content

Commit

Permalink
fix: typo on truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Nov 21, 2024
1 parent 24ef661 commit 0ebf56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/xloader/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _clear_datastore_resource(resource_id):
engine = get_write_engine()
with engine.begin() as conn:
conn.execute(sa.text("SET LOCAL lock_timeout = '15s'"))
conn.execute(sa.text('TRUNCATE TABLE "{} RESTART IDENTITY"'.format(resource_id)))
conn.execute(sa.text('TRUNCATE TABLE "{}" RESTART IDENTITY'.format(resource_id)))


def load_csv(csv_filepath, resource_id, mimetype='text/csv', logger=None):
Expand Down

0 comments on commit 0ebf56c

Please sign in to comment.