query/solve/ensure
[scpubgit/DKit.git] / lib / DX / Role / Op / FindIsh.pm
index 758070b..64c3621 100644 (file)
@@ -41,11 +41,20 @@ sub run {
       $state->then($op);
     }
   );
+  my $allow = $state->allow_actions;
   my $ret = DX::Op::SetScope->new(
     scope => $state->scope,
-    next => $self->make_result_handler($coll),
+    next => DX::Op::FromCode->new(
+      code => sub {
+        my ($self, $state) = @_;
+        $state->but(allow_actions => $allow)
+              ->then($self->next);
+      },
+      next => $self->make_result_handler($coll),
+    )
   );
   $state->assign_vars($self->var_name => {})
+        ->but(allow_actions => 0)
         ->push_return_then($ret, $invoke)->mark_choice($var);
 }