This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a commit to branch release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v1.0 by this push:
new 45add318d fix(domainlayer): simplify codes (#7794) (#7796)
45add318d is described below
commit 45add318d1303357316e5039a07cf9e59306acad
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 30 22:08:54 2024 +0800
fix(domainlayer): simplify codes (#7794) (#7796)
Co-authored-by: Lynwee <[email protected]>
---
backend/core/models/domainlayer/ticket/issue.go | 7 -------
1 file changed, 7 deletions(-)
diff --git a/backend/core/models/domainlayer/ticket/issue.go
b/backend/core/models/domainlayer/ticket/issue.go
index 816571a4a..25039e8df 100644
--- a/backend/core/models/domainlayer/ticket/issue.go
+++ b/backend/core/models/domainlayer/ticket/issue.go
@@ -18,7 +18,6 @@ limitations under the License.
package ticket
import (
- "errors"
"github.com/apache/incubator-devlake/core/models/domainlayer"
"time"
)
@@ -111,9 +110,6 @@ func (issue Issue) IsIncident() bool {
}
func (issue Issue) ToIncidentAssignee() (*IncidentAssignee, error) {
- if !issue.IsIncident() {
- return nil, errors.New("issue type is not INCIDENT, cannot
generate incident_assignee")
- }
return &IncidentAssignee{
IncidentId: issue.Id,
AssigneeId: issue.AssigneeId,
@@ -123,9 +119,6 @@ func (issue Issue) ToIncidentAssignee() (*IncidentAssignee,
error) {
}
func (issue Issue) ToIncident() (*Incident, error) {
- if !issue.IsIncident() {
- return nil, errors.New("issue type is not INCIDENT, cannot
generate incident")
- }
incident := &Incident{
DomainEntity: issue.DomainEntity,
Url: issue.Url,