fix: return on any error

This commit is contained in:
Derrick Hammer 2024-02-29 09:55:07 -05:00
parent 754ab390f0
commit 64f52a87bd
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 3 deletions

View File

@ -133,9 +133,7 @@ func (m *MetadataServiceDefault) GetUpload(ctx context.Context, objectHash []byt
ret := m.db.WithContext(ctx).Model(&models.Upload{}).Where(&upload).First(&upload) ret := m.db.WithContext(ctx).Model(&models.Upload{}).Where(&upload).First(&upload)
if ret.Error != nil { if ret.Error != nil {
if errors.Is(ret.Error, gorm.ErrRecordNotFound) { return UploadMetadata{}, ret.Error
return UploadMetadata{}, ret.Error
}
} }
return UploadMetadata{ return UploadMetadata{