mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-25 06:35:32 +00:00
Fix webhook payload issue by moving event dispatch after project reload
Co-authored-by: kolaente <13721712+kolaente@users.noreply.github.com>
This commit is contained in:
@@ -1013,14 +1013,6 @@ func UpdateProject(s *xorm.Session, project *Project, auth web.Auth, updateProje
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = events.Dispatch(&ProjectUpdatedEvent{
|
|
||||||
Project: project,
|
|
||||||
Doer: auth,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
l, err := GetProjectSimpleByID(s, project.ID)
|
l, err := GetProjectSimpleByID(s, project.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -1028,7 +1020,15 @@ func UpdateProject(s *xorm.Session, project *Project, auth web.Auth, updateProje
|
|||||||
|
|
||||||
*project = *l
|
*project = *l
|
||||||
err = project.ReadOne(s, auth)
|
err = project.ReadOne(s, auth)
|
||||||
return
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = events.Dispatch(&ProjectUpdatedEvent{
|
||||||
|
Project: project,
|
||||||
|
Doer: auth,
|
||||||
|
})
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func recalculateProjectPositions(s *xorm.Session, parentProjectID int64) (err error) {
|
func recalculateProjectPositions(s *xorm.Session, parentProjectID int64) (err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user