Log issues/suggestion with info (#2629)

This commit is contained in:
Pascal Vizeli 2021-02-25 19:52:19 +01:00 committed by GitHub
parent baa86f09e5
commit 78d9c60be5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,8 +67,12 @@ class ResolutionManager(CoreSysAttributes):
@issues.setter
def issues(self, issue: Issue) -> None:
"""Add issues."""
if issue not in self._issues:
self._issues.append(issue)
if issue in self._issues:
return
_LOGGER.info(
"Create new issue %s - %s / %s", issue.type, issue.context, issue.reference
)
self._issues.append(issue)
@property
def suggestions(self) -> List[Suggestion]:
@ -78,8 +82,15 @@ class ResolutionManager(CoreSysAttributes):
@suggestions.setter
def suggestions(self, suggestion: Suggestion) -> None:
"""Add suggestion."""
if suggestion not in self._suggestions:
self._suggestions.append(suggestion)
if suggestion in self._suggestions:
return
_LOGGER.info(
"Create new suggestion %s - %s / %s",
suggestion.type,
suggestion.context,
suggestion.reference,
)
self._suggestions.append(suggestion)
@property
def unsupported(self) -> List[UnsupportedReason]: