Skip to content

Commit

Permalink
Instead of erroring on missing DIG fields let the schema check the in…
Browse files Browse the repository at this point in the history
…comming data
  • Loading branch information
vanbalend committed May 12, 2021
1 parent f3b00da commit 3d6db15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckanext/cfpb_extrafields/controllers/digimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def upload(self):
dig = request.POST["file"].file
group = request.POST["group"]
rec, errors = make_rec(dig)
if errors:
if False: #errors:
redirect_to("import_page", errors=json.dumps(errors), group=group)
else:
rec["owner_org"] = group
rec["name"] = make_name(request.POST.get("name") or rec["title"])
rec["notes"] = rec["notes"] or "Record automatcially created from DIG file"
rec["name"] = make_name(request.POST.get("name") or rec.get("title",""))
rec["notes"] = rec.get("notes","") or "Record automatcially created from DIG file"
try:
upload_rec(rec)
except ValidationError as err:
Expand Down

0 comments on commit 3d6db15

Please sign in to comment.