Skip to content

Commit

Permalink
Merge pull request #72 from Open-Telecoms-Data/2022-12-14
Browse files Browse the repository at this point in the history
work
  • Loading branch information
James (ODSC) authored Dec 15, 2022
2 parents 5fa0285 + 12abf14 commit 8b67733
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cove_ofds/jsonschema_validation_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def add_type_to_json_schema_validation_error(data: dict) -> dict:
data["cove_type"] = "Valueisnotanarray"

elif data["validator"] == "required":
# Need to get Id field - https://github.com/Open-Telecoms-Data/cove-ofds/issues/70
if data["message"].endswith("' is a required property"):
message_bits = data["message"].split("'")
data["validator_value"] = message_bits[1]
data["cove_type"] = "Missingrequiredfields"

elif data["validator"] == "minProperties":
Expand Down
3 changes: 2 additions & 1 deletion libcoveweb2/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ class NewJSONTextForm(forms.Form):

class NewSpreadsheetUploadForm(forms.Form):
file_upload = forms.FileField(
label="",
widget=forms.FileInput(
attrs={
"accept": ",".join(
settings.ALLOWED_SPREADSHEET_CONTENT_TYPES
+ settings.ALLOWED_SPREADSHEET_EXTENSIONS
)
}
)
),
)


Expand Down

0 comments on commit 8b67733

Please sign in to comment.