Skip to content

Commit

Permalink
fixup: remove primary key from csv
Browse files Browse the repository at this point in the history
We don't show this in the UI because it's not populated reliably, so
we shouldn't included it in the csv either.
  • Loading branch information
MatMoore committed Nov 8, 2024
1 parent c572030 commit efcf56c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions home/service/details_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def data(self):
(
column.name,
column.display_name,
column.is_primary_key,
column.type,
column.nullable,
column.description,
Expand All @@ -26,7 +25,6 @@ def headers(self):
return [
"name",
"display_name",
"is_primary_key",
"type",
"nullable",
"description",
Expand Down
3 changes: 0 additions & 3 deletions tests/home/service/test_details_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def test_dataset_details_csv_formatter(example_table):
assert csv_formatter.headers() == [
"name",
"display_name",
"is_primary_key",
"type",
"nullable",
"description",
Expand All @@ -50,15 +49,13 @@ def test_dataset_details_csv_formatter(example_table):
(
"foo",
"Foo",
True,
"string",
False,
"an example",
),
(
"bar",
"Bar",
False,
"integer",
True,
"another example",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def test_csv_output(self, client):
response.headers["Content-Disposition"] == 'attachment; filename="fake.csv"'
)
assert response.content == (
b"name,display_name,is_primary_key,type,nullable,description\r\n"
+ b"urn,urn,True,string,False,description **with markdown**\r\n"
b"name,display_name,type,nullable,description\r\n"
+ b"urn,urn,string,False,description **with markdown**\r\n"
)


Expand Down

0 comments on commit efcf56c

Please sign in to comment.