diff --git a/pkg/datastore/gormstore/script_policy.go b/pkg/datastore/gormstore/script_policy.go index 72f1b6f..d8dbb97 100644 --- a/pkg/datastore/gormstore/script_policy.go +++ b/pkg/datastore/gormstore/script_policy.go @@ -19,6 +19,7 @@ func (env *ScriptPolicy) Get(ctx context.Context, id int64) (model.ScriptPolicy, if errors.Is(err, gorm.ErrRecordNotFound) { return mdl, datastore.ErrNotExist } + return mdl, err } return mdl, nil } @@ -29,6 +30,7 @@ func (env *ScriptPolicy) GetFromHash(ctx context.Context, hash uint64) (model.Sc if errors.Is(err, gorm.ErrRecordNotFound) { return mdl, datastore.ErrNotExist } + return mdl, err } return mdl, nil } diff --git a/pkg/datastore/gormstore/scripts.go b/pkg/datastore/gormstore/scripts.go index d792f3c..1aa7f1f 100644 --- a/pkg/datastore/gormstore/scripts.go +++ b/pkg/datastore/gormstore/scripts.go @@ -19,6 +19,7 @@ func (env *Scripts) Get(ctx context.Context, id int64) (model.Script, error) { if errors.Is(err, gorm.ErrRecordNotFound) { return mdl, datastore.ErrNotExist } + return mdl, err } return mdl, nil } diff --git a/pkg/datastore/gormstore/submissions.go b/pkg/datastore/gormstore/submissions.go index 7e71c60..8066511 100644 --- a/pkg/datastore/gormstore/submissions.go +++ b/pkg/datastore/gormstore/submissions.go @@ -20,6 +20,7 @@ func (env *Submissions) Get(ctx context.Context, id int64) (model.Submission, er if errors.Is(err, gorm.ErrRecordNotFound) { return submission, datastore.ErrNotExist } + return submission, err } return submission, nil }