File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
pkg/controller/postgresuser Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -350,11 +350,11 @@ func (r *ReconcilePostgresUser) getPostgresCR(instance *dbv1alpha1.PostgresUser)
350350 database := dbv1alpha1.Postgres {}
351351 err := r .client .Get (context .TODO (),
352352 types.NamespacedName {Namespace : instance .Namespace , Name : instance .Spec .Database }, & database )
353- if ! utils .MatchesInstanceAnnotation (database .Annotations , r .instanceFilter ) {
354- err = fmt .Errorf ("database \" %s\" is not managed by this operator" , database .Name )
353+ if err != nil {
355354 return nil , err
356355 }
357- if err != nil {
356+ if ! utils .MatchesInstanceAnnotation (database .Annotations , r .instanceFilter ) {
357+ err = fmt .Errorf ("database \" %s\" is not managed by this operator" , database .Name )
358358 return nil , err
359359 }
360360 if ! database .Status .Succeeded {
You can’t perform that action at this time.
0 commit comments