fix: return on any error
This commit is contained in:
parent
754ab390f0
commit
64f52a87bd
|
@ -133,10 +133,8 @@ func (m *MetadataServiceDefault) GetUpload(ctx context.Context, objectHash []byt
|
|||
ret := m.db.WithContext(ctx).Model(&models.Upload{}).Where(&upload).First(&upload)
|
||||
|
||||
if ret.Error != nil {
|
||||
if errors.Is(ret.Error, gorm.ErrRecordNotFound) {
|
||||
return UploadMetadata{}, ret.Error
|
||||
}
|
||||
}
|
||||
|
||||
return UploadMetadata{
|
||||
UserID: upload.UserID,
|
||||
|
|
Loading…
Reference in New Issue