Fixed error message when trying to change prio to a used number.
This commit is contained in:
parent
06f88f697c
commit
e10783ec54
@ -101,7 +101,7 @@ func UpdateNotificationService(svc notification.Service) (created bool, err erro
|
|||||||
// Check if this is just a duplicated prio, which isn't allowed.
|
// Check if this is just a duplicated prio, which isn't allowed.
|
||||||
pgErr, isPgErr := err.(*pq.Error)
|
pgErr, isPgErr := err.(*pq.Error)
|
||||||
if isPgErr && pgErr.Code == "23505" {
|
if isPgErr && pgErr.Code == "23505" {
|
||||||
return false, werr.New("Prio %d is already used by another service", svc.GetPrio())
|
return false, werr.New("Prio %d is already used by another service", svc.Updated().GetPrio())
|
||||||
}
|
}
|
||||||
|
|
||||||
return false, werr.Wrap(err).WithData(
|
return false, werr.Wrap(err).WithData(
|
||||||
|
Loading…
Reference in New Issue
Block a user