fix(backgrounds): return full project after uploading image
continuous-integration/drone/push Build is failing Details

This commit is contained in:
kolaente 2024-04-22 18:33:43 +02:00
parent aec60f3591
commit 409822442b
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 0 deletions

View File

@ -213,6 +213,12 @@ func (bp *BackgroundProvider) UploadBackground(c echo.Context) error {
return handler.HandleHTTPError(err, c)
}
err = project.ReadOne(s, auth)
if err != nil {
_ = s.Rollback()
return handler.HandleHTTPError(err, c)
}
if err := s.Commit(); err != nil {
_ = s.Rollback()
return handler.HandleHTTPError(err, c)