Skip to content

Commit 2875ace

Browse files
committed
bugfix/tag-sink-fix-v2
1 parent 183b2f0 commit 2875ace

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dongtai_web/views/vul_details.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ def parse_graphy(self, graphy):
143143
_item = f"{method['callerClass']}.{method['callerMethod']}()"
144144
filename = method['callerClass']
145145
line_number = method['callerLineNumber']
146-
if method['tag'] == 'source':
146+
# For compatibility with old data
147+
# (method_counts > 1 and i == 0)
148+
# it should remove after serval versions
149+
if method['tag'] == 'source' or (method_counts > 1 and i == 0):
147150
data_type = _('Source method')
148151
elif method['tag'] == 'sink':
149152
data_type = _('Hazardous method')

0 commit comments

Comments
 (0)