Skip to content
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

Return dedupe to a "working" state #1508

Merged
merged 2 commits into from Aug 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions dojo/models.py
Expand Up @@ -1367,16 +1367,16 @@ def save(self, dedupe_option=True, false_history=False, rules_option=True, *args
else:
super(Finding, self).save(*args, **kwargs)

if (self.line is not None and self.file_path is not None) and (self.endpoints.count() == 0):
if (self.file_path is not None) and (self.endpoints.count() == 0):
self.static_finding = True
self.dynamic_finding = False
elif (self.line is not None and self.file_path is not None):
elif (self.file_path is not None):
self.static_finding = True

# Compute hash code before dedupe
if (self.hash_code is None):
if((self.dynamic_finding and (self.endpoints.count() > 0)) or
(self.static_finding and (self.line is not None and self.file_path is not None))):
(self.static_finding and (self.file_path is not None))):
self.hash_code = self.compute_hash_code()
self.found_by.add(self.test.test_type)

Expand Down