-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dig import 2021 #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, two minor questions/comments, but fine to merge as-is.
ckanext/cfpb_extrafields/digutils.py
Outdated
#except ImportError: # pragma: no cover | ||
# # If the custom exception can't be imported, use a more generic exception | ||
# # This happens when ckan is not installed locally, like when running unit tests on travis. | ||
# Invalid = Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can problem just remove this rather than comment it out, no?
ckanext/cfpb_extrafields/digutils.py
Outdated
# Invalid = Exception | ||
|
||
Invalid = Exception | ||
NotFound = StopIteration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just use the actual Exceptions at this point, rather than alias them?
@tanderegg please review and merge |
@@ -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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment explaining why we're skipping this, for now?
Account for Exceptions outside of CKAN validation
Pass DIG record to CKAN api for validation rather than error on missing field