-
Notifications
You must be signed in to change notification settings - Fork 513
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 validator bug with DFS_STATUS error log message #10045
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. Remarkable how this never came up before.
5e0ecb1
to
0265c59
Compare
@@ -2941,7 +2941,6 @@ def checkLine(self, data): | |||
self.logger.error( | |||
'Value in DFS_STATUS column is not 0:DiseaseFree, ' | |||
'1:Recurred/Progressed, 1:Recurred, 1:Progressed', |
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.
@pvannierop I think we should still keep these values recommendations, I was wondering if you delete the comma at the end of this line, will that fix the problem too?
'1:Recurred/Progressed, 1:Recurred, 1:Progressed', | |
'1:Recurred/Progressed, 1:Recurred, 1:Progressed,' |
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.
It is already there. The final message will state:
Value in DFS_STATUS column is not 0:DiseaseFree, 1:Recurred/Progressed, 1:Recurred, 1:Progressed
@@ -2941,7 +2941,6 @@ def checkLine(self, data): | |||
self.logger.error( | |||
'Value in DFS_STATUS column is not 0:DiseaseFree, ' | |||
'1:Recurred/Progressed, 1:Recurred, 1:Progressed', | |||
'DiseaseFree, Recurred/Progressed, Recurred or Progressed', |
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.
@pvannierop I see, I was wondering why we delete DiseaseFree, Recurred/Progressed, Recurred or Progressed
. Now I get it. You are right. We don't support formats like these DiseaseFree, Recurred/Progressed, Recurred or Progressed
anymore, we only support values with the prefix 0
or 1
. So we should delete this line.
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.
Approved, thanks for answering my question!
Does not expect a second argument since there is no '%' in the message.
0265c59
to
7ff7623
Compare
Kudos, SonarCloud Quality Gate passed! |
Problem
The python validator throws a python error when there is a data-dependent error in the
DFS_STATUS
column.Solution
This is caused by the passing of a f-string variable where there is no need for string replacement (no
%
present in message string). Removal of the second argument corrects this problem.