Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Validata
Validata Core
Commits
d2462828
Commit
d2462828
authored
Apr 03, 2020
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harden code to handle non string values
parent
15fe5a78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
validata_core/custom_checks/sum_columns_value.py
validata_core/custom_checks/sum_columns_value.py
+6
-2
No files found.
validata_core/custom_checks/sum_columns_value.py
View file @
d2462828
...
...
@@ -52,9 +52,13 @@ class SumColumnsValue(object):
return
val
!=
''
@
staticmethod
def
is_int
(
str_
value
):
def
is_int
(
value
):
""" Return True if the given string contains an integer """
return
INT_RE
.
match
(
str_value
)
if
isinstance
(
value
,
int
):
return
True
if
isinstance
(
value
,
str
):
return
INT_RE
.
match
(
value
)
return
False
def
check_row
(
self
,
cells
):
""" Main method """
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment