Skip to content

Commit

Permalink
Refactor: Fix error raised by linter
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankApiyo committed Aug 8, 2023
1 parent fbbd67b commit fe8c07f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions onadata/apps/api/viewsets/xform_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ def data_import(self, request, *args, **kwargs):

else:
if xls_file and xls_file.name.split(".")[-1] in XLS_EXTENSIONS:
xls_file_name = xls_file.name
csv_file = submission_xls_to_csv(xls_file)
overwrite = request.query_params.get("overwrite")
overwrite = (
Expand All @@ -709,7 +708,7 @@ def data_import(self, request, *args, **kwargs):
if hasattr(csv_file, "name"):
file_name = csv_file.name
else:
file_name = xls_file_name
file_name = xls_file and xls_file.name
upload_to = os.path.join(
request.user.username, "csv_imports", file_name
)
Expand Down

0 comments on commit fe8c07f

Please sign in to comment.