fix: return on any error
This commit is contained in:
parent
754ab390f0
commit
64f52a87bd
|
@ -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)
|
||||
|
||||
if ret.Error != nil {
|
||||
if errors.Is(ret.Error, gorm.ErrRecordNotFound) {
|
||||
return UploadMetadata{}, ret.Error
|
||||
}
|
||||
return UploadMetadata{}, ret.Error
|
||||
}
|
||||
|
||||
return UploadMetadata{
|
||||
|
|
Loading…
Reference in New Issue