Skip to content

Commit

Permalink
Fix issue where html_report_url did not have a hasattr() check (#13)
Browse files Browse the repository at this point in the history
* Fix issue where html_report_url did not have a hasattr() check

* Changed back to report.commit from report.commit_hash for backwards support
  • Loading branch information
dacoburn authored Oct 3, 2024
1 parent 920b663 commit ebc53a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion socketsync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


__author__ = 'socket.dev'
__version__ = '1.0.12'
__version__ = '1.0.14'
__all__ = [
"log",
"__version__",
Expand Down
2 changes: 1 addition & 1 deletion socketsync/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, **kwargs):
self.pull_requests = [self.pull_request]
if not hasattr(self, 'pull_requests') and hasattr(self, 'pull_request'):
self.pull_requests = [self.pull_request]
if self.html_report_url is not None:
if hasattr(self, 'html_report_url') and self.html_report_url is not None:
self.url = self.html_report_url
if not hasattr(self, 'commit'):
self.commit = self.commit_hash
Expand Down
2 changes: 1 addition & 1 deletion socketsync/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def create_issue_alerts(package: Package, alerts: list, packages: dict, report:
branch=report.branch,
report_id=report.id,
pr=pr,
commit=report.commit_hash,
commit=report.commit,
created_at=report.created_at,
pkg_type=package.type,
pkg_name=package.name,
Expand Down

0 comments on commit ebc53a2

Please sign in to comment.