Skip to content

Commit

Permalink
Merge pull request #172 from open-contracting/fix/append-slash
Browse files Browse the repository at this point in the history
fix: unset APPEND_SLASH
  • Loading branch information
VDigitall committed May 5, 2021
2 parents 8e2ffcb + 5f89bf9 commit ccac684
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions core/tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,14 @@ def test_table_split_include_preview(self, client, url_obj_w_files):
assert len(response.json()) == 3
data = response.json()[0]
assert set(data.keys()) == {"id", "name", "preview", "heading", "column_headings"}

def test_table_split_failed(self, client, url_obj_w_files):
selection = create_data_selection(client, url_obj_w_files, self.url_prefix)
tables = client.get(f"{self.url_prefix}{url_obj_w_files.id}/selections/{selection['id']}/tables/").json()

response = client.patch(
f"{self.url_prefix}{url_obj_w_files.id}/selections/{selection['id']}/tables/{tables[0]['id']}",
data={"split": True},
content_type="application/json",
)
assert response.status_code == 404
2 changes: 1 addition & 1 deletion spoonbill_web/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@

# Routes
API_PREFIX = os.getenv("API_PREFIX", "")

APPEND_SLASH = False

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
Expand Down

0 comments on commit ccac684

Please sign in to comment.