mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
Fix bugs
This commit is contained in:
parent
ad48851118
commit
5f46d8fdc5
@ -272,7 +272,7 @@ class PageTests(TestCase):
|
||||
for ph in [
|
||||
r'a href="/expofiles/documents/bier-tent-instructions.pdf">bier-tent-instructions.pdf',
|
||||
r'a href="/expofiles/documents/boc.pdf">boc.pdf',
|
||||
r'a href="/expofiles/documents/bierbook">/bierbook',
|
||||
r'a href="/expofiles/documents/idiots-guide-expo-git.pdf"',
|
||||
]:
|
||||
phmatch = re.search(ph, content)
|
||||
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")
|
||||
@ -343,7 +343,7 @@ class PageTests(TestCase):
|
||||
|
||||
def test_page_expofile_document_rope_pdf(self):
|
||||
# Flat file tests.
|
||||
response = self.client.get("/expofiles/documents/rope-age-agm-2019.pdf")
|
||||
response = self.client.get("/expofiles/documents/ropes/rope-age-agm-2019.pdf")
|
||||
if response.status_code != HTTPStatus.OK:
|
||||
self.assertEqual(response.status_code, HTTPStatus.FOUND)
|
||||
if response.status_code != HTTPStatus.FOUND:
|
||||
|
@ -20,6 +20,7 @@ from troggle.core.models.survex import SurvexBlock, SurvexFile, SurvexPersonRole
|
||||
from troggle.core.models.troggle import DataIssue, Expedition
|
||||
from troggle.core.models.wallets import Wallet, YEAR_RANGE
|
||||
|
||||
from troggle.core.views.auth import login_required_if_public
|
||||
from troggle.core.views.caves import getCave
|
||||
from troggle.core.views.scans import caveifywallet, oldwallet
|
||||
from troggle.core.views.uploads import FilesForm
|
||||
@ -39,7 +40,7 @@ todo = """
|
||||
- Refactor walletedit() as it contains all the wallets 'complaints' code from the pre-2022
|
||||
script 'wallets.py'
|
||||
|
||||
- Need to validate uploaded file as being a valid image file, not a dubious script or hack
|
||||
- We should validate uploaded file as being a valid image file, not a dubious script or hack?
|
||||
"""
|
||||
WALLET_BLANK_JSON = {
|
||||
"cave": "",
|
||||
@ -851,10 +852,12 @@ def walletedit(request, path=None):
|
||||
else:
|
||||
svxothers = None
|
||||
trips = None
|
||||
wallets = None
|
||||
|
||||
else:
|
||||
svxothers = None
|
||||
trips = None
|
||||
wallets = None
|
||||
|
||||
# Survex and survex complaints, comes from json file on disc, not as pre-populated as above
|
||||
complaints, caveobject = get_complaints([], waldata, svxfiles, files, wallet, wurl)
|
||||
|
Loading…
Reference in New Issue
Block a user