Skip to content

Commit

Permalink
Merge pull request #120 from simpnu/reanalyze_version_code
Browse files Browse the repository at this point in the history
Reanalyze application if the version code changes
  • Loading branch information
U039b committed Oct 16, 2018
2 parents 1fcfc06 + f386c47 commit 404602d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions exodus/exodus/core/apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ def start_static_analysis(analysis):
version = static_analysis.get_version()
version_code = static_analysis.get_version_code()

# If a report exists for this couple (handle, version), just return it
existing_report = Report.objects.filter(application__handle = handle, application__version = version).order_by(
'-creation_date').first()
# If a report exists for the same handle, version & version_code, return it
existing_report = Report.objects.filter(
application__handle=handle,
application__version=version,
application__version_code=version_code
).order_by('-creation_date').first()

if existing_report is not None:
clear_analysis_files(storage_helper, analysis.tmp_dir, analysis.bucket, True)
request.description = 'A report already exists for this application version'
Expand Down

0 comments on commit 404602d

Please sign in to comment.