Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Jan 17, 2025
1 parent 6724834 commit fc3faee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions onadata/apps/viewer/models/data_dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,10 @@ def invalidate_caches(sender, instance=None, created=False, **kwargs):

def create_export_columns_register(sender, instance=None, created=False, **kwargs):
"""Create export repeat register for the form"""
# Avoid cyclic import by using importlib
csv_builder = importlib.import_module("onadata.libs.utils.csv_builder")

if created:
# Avoid cyclic import by using importlib
csv_builder = importlib.import_module("onadata.libs.utils.csv_builder")
ordered_columns = OrderedDict()
# pylint: disable=protected-access
csv_builder.CSVDataFrameBuilder._build_ordered_columns(
Expand Down

0 comments on commit fc3faee

Please sign in to comment.