Add validation to deleteThing endpoint to prevent deletion of things with associated tasks
This commit is contained in:
parent
e40c2a84cd
commit
6845fd54f1
2 changed files with 13 additions and 0 deletions
|
@ -48,6 +48,9 @@ func (n *NotificationPlanner) GenerateNotifications(c context.Context, chore *ch
|
|||
var mt *chModel.NotificationMetadata
|
||||
if err := json.Unmarshal([]byte(*chore.NotificationMetadata), &mt); err != nil {
|
||||
log.Error("Error unmarshalling notification metadata", err)
|
||||
return false
|
||||
}
|
||||
if chore.NextDueDate == nil {
|
||||
return true
|
||||
}
|
||||
if mt.DueDate {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue